in reply to Faking Script Names
Assume that the name of this script is arg_test.pl, run the command:use strict; use warnings; { print "\$0 = $0\n"; print "\$ARGV[0] = $ARGV[0]\n"; }
>perl -w arg_test.pl foo
which yields this output:
The rest of your scripts behaviour should become clear.$0 = arg_test.pl $ARGV[0] = foo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Faking Script Names
by ikegami (Patriarch) on Jul 23, 2005 at 00:13 UTC | |
by shemp (Deacon) on Jul 26, 2005 at 17:20 UTC |