<div class="gmail_quote">On Mon, Mar 23, 2009 at 5:48 PM, Matthew Lanier <span dir="ltr">&lt;<a href="mailto:matt@lanier.org">matt@lanier.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
long story, i&#39;m trying to not modify the startup context if i don&#39;t need to.<br>
<br>
as dfetter suggested, &#39;/usr/bin/env perl&#39; works, though it appears to work via perl being in the path.<font color="#888888"><br></font></blockquote></div><br>On some boxes at $work, we have very old or otherwise wonky Perl installations as the system Perl.  I&#39;ve built and installed a newer Perl on these boxes; to use the new Perl transparently I created a small module that checks $^X to see what&#39;s currently executing the script.  If it&#39;s the old system Perl and the new Perl is available, we exec ourself under the new Perl; if we&#39;re running under the new Perl (or it&#39;s unavailable), it&#39;s a no-op.<br>
<br>This works nicely as it&#39;s use&#39;d, and so gets run nice and early.  I&#39;d imagine if you had to, you could rig it to reexec with more command-line parameters...<br><br>                               -Chris<br>
-- <br>Chris Weyl<br>Ex astris, scientia<br>