<div class="gmail_quote">On Mon, Mar 23, 2009 at 5:48 PM, Matthew Lanier <span dir="ltr"><<a href="mailto:matt@lanier.org">matt@lanier.org</a>></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'm trying to not modify the startup context if i don't need to.<br>
<br>
as dfetter suggested, '/usr/bin/env perl' 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'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's currently executing the script. If it's the old system Perl and the new Perl is available, we exec ourself under the new Perl; if we're running under the new Perl (or it's unavailable), it's a no-op.<br>
<br>This works nicely as it's use'd, and so gets run nice and early. I'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>