in reply to A shebang line conundrum

So, based on the other posts, you can't get your BOFH to install a symbolic link, and the SGI machines have both Perl 4 and Perl 5, and the default path invokes Perl 4.

A couple of other things to try:

  1. If you can change the default path on the SGIs, put the Perl 5 directory first, then use the eval 'exec perl ...' if 0 trick.
  2. Use the "pack up the dirt in another script" idea, but in reverse. In other words, write a shell script perlwrap, which on the Linux machines contains
    #! /bin/bash exec /usr/bin/perl $*
    and on the SGI machines contains:
    #! /bin/sh exec /usr/local/bin/perl $*
    Then you can preface your scripts with #! /usr/local/bin/perlwrap(or whever you put it). At least this way you can deploy the same Perl script, and your users can just type the script name. Yeah, it's ugly, and needs more maintenance than the symlink, but it should work.

Personally, I'd keep trying the path and/or symlink thing before I resort to that second option.

Update
Nevermind, read perrin's note above. I kept thinking there was a better way....

Replies are listed 'Best First'.
Re: Re: A shebang line conundrum
by inelukii (Sexton) on Oct 04, 2002 at 21:59 UTC
    Thanks for all the suggestions, Perrin's suggestion is working and will make my life easier until I eventually get my symlink.