Just in has asked for the wisdom of the Perl Monks concerning the following question:
Good morrow all.
I'd like to be able to determine what command line switches perl was run with. In the following, how could I print out -w and -MMath::Trig?
C:/>perl -w -MMath::Trig try.pl Name "main::old" used only once: possible typo at try.pl line 6. try.pl = [] Use of uninitialized value in print at try.pl line 6. C:/>cat try.pl local $" = q{], [}; local $| = 1; print "$0 = [@ARGV]\n"; print $old[1]; C:/>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading command line switches
by BrowserUk (Patriarch) on Mar 16, 2011 at 02:21 UTC | |
by Just in (Sexton) on Mar 16, 2011 at 02:53 UTC | |
|
Re: Reading command line switches
by ww (Archbishop) on Mar 16, 2011 at 01:58 UTC | |
by Just in (Sexton) on Mar 16, 2011 at 02:42 UTC |