Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Using perl's runtime options with -Mstrictby deprecated (Priest) |
on Jan 27, 2001 at 03:16 UTC ( [id://54671]=perlquestion: print w/replies, xml ) | Need Help?? |
deprecated has asked for the wisdom of the Perl Monks concerning the following question:
Greetings, Monks.
I was recently turned on to perl -s as a way to parse command line options (please, I dont want to know about any more command line options modules, its way overkill). So, without further ado, from perldoc perlrun: So I am taken to understanding that I can then use an option from the command line to have $xyz (or $switch, as used in the example below) defined. Here's a relevant example:
which yields us: I guess then what I need to do is "turn off" strict while I am parsing the command-line options. My idea was to use an anonymous code block ( { ... } ) turn off strict in there, and then just close it.
thanks,
Back to
Seekers of Perl Wisdom
|
|