in reply to 2 versions of perl

In bash: alias perl-10='/path/to/perl-5.10/bin/perl'
In t/csh: alias perl-10 /path/to/perl-5.10/bin/perl'

Replies are listed 'Best First'.
Re^2: 2 versions of perl
by oko1 (Deacon) on Apr 12, 2008 at 15:20 UTC

    That would be fine if you were trying to invoke Perl from the commandline; it won't work for a script.

    ben@Tyr:~$ alias foobar="/usr/bin/perl" ben@Tyr:~$ cat <<! >xyz > #!foobar -w > print \$ARGV[0] > ! ben@Tyr:~$ chmod +x xyz ben@Tyr:~$ ./xyz Hello -bash: ./xyz: foobar: bad interpreter: No such file or directory
    
    

    Update: Added a '\' in front '$ARGV'. It doesn't change the outcome, but it actually puts "$ARGV[0]" instead of "[0]" into 'xyz'...

    -- Human history becomes more and more a race between education and catastrophe. -- HG Wells