Do you know where your variables are? | |
PerlMonks |
Re: Is using '-s' really bad and why?by belden (Friar) |
on Oct 19, 2004 at 20:58 UTC ( [id://400668]=note: print w/replies, xml ) | Need Help?? |
I occassionally use -s in one-off programs. Once I find myself setting more than 3 vars with -s, I switch over to something more suited to the task - usually Getopt::Long, since I like its flexibility. At one point I was (ab)using -s so much that I wrote a silly module to parse the variables set by -s. The module is pretty boring; code that used it looked like this:
I've currently got one script that uses that module: the test script for the module. Fortunately I've found better things to waste my time on these days :)
In Section
Seekers of Perl Wisdom
|
|