magus says (in zid=1357716), I use this for psychotic "must run anywhere" perl scripts: #!/bin/sh exec perl -x -S $0 ${1+"$@"} # -*-perl-*- #!perl -w if ($] !~ /^5\..*/) { # uh-oh. this isn't perl 5. foreach (split(/:/, $ENV{PATH})) { # try to find "perl5". exec("$_/perl5", "-x", "-S", $0, @ARGV) if (-x "$_/perl5"); } # we failed. bail. die "Your perl is too old; I need perl 5. See the README for what to do.\n"; } # load the real script. this is isolated in an 'eval' so perl4 won't # choke on the perl5-isms. eval join("\n", ); if ($@) { die "$@"; } __END__ # real script goes here