in reply to A shebang line conundrum

Here's a unique workaround that I've come across in the past-- replace #!/usr/local/bin/perl or #!/usr/bin/perl (or whatever) with the following:
eval 'exec perl -S $0 "$@"' if 0; # Rest of code goes here
Hope it helps.

scott.

Replies are listed 'Best First'.
Re: Re: A shebang line conundrum
by inelukii (Sexton) on Oct 04, 2002 at 21:06 UTC
    Should have mentioned this in the original post, but the SGI machines have two versions of perl. Unfortunately, "perl" on the SGIs invokes the old 4.x version; otherwise this solution would work great.

    Thanks
      You can say this:
      #!/usr/bin/env perl
      If you make sure the right perl is first in your path, it will run that. This is all in the perlrun manpage.
Re: Re: A shebang line conundrum
by Anonymous Monk on Oct 10, 2002 at 18:16 UTC
    How does that work?