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
In reply to Re^2: 2 versions of perl
by oko1
in thread 2 versions of perl
by LinuxNoobPhilip
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |