in reply to Re: how to invoke a different perl interpreter based on user ENV variable
in thread how to invoke a different perl interpreter based on user ENV variable

Of course that wouldn't work, silly me. You'd just be continually exec'ing, without passing arguments as well. You'd need to stretch it out with more code:

#!c:/perl/bin/perl -w if (defined($ARGV[0]) and $ARGV[0] eq 'skip') { shift @ARGV; } else { exec $ENV{TEST_PERLROOT}, $0, 'skip', @ARGV if $ENV{TEST_PERLROOT}; } print 'My arguments: ', join(', ', @ARGV), $/;

  • Comment on Re^2: how to invoke a different perl interpreter based on user ENV variable
  • Download Code

Replies are listed 'Best First'.
Re: Re^2: how to invoke a different perl interpreter based on user ENV variable
by billbabcock (Acolyte) on Feb 16, 2004 at 17:08 UTC
    excellent. this works. I'll also look at par. I wanted to avoid having users messing with their PATH unless that was the last option. Thanks to all! - bill