![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Re: Useless use of string eqby naChoZ (Curate) |
on Dec 06, 2007 at 15:04 UTC ( #655429=note: print w/replies, xml ) | Need Help?? |
I could be wrong, but this smells like a good opportunity to learn about Getopt::Long. I tend to use it with the hashref method like this.
Now, if you type your_script.pl --target bar --cust FET --cotime baz then your $opts hashref will be populated accordingly. $opts->{target} will be 'bar', $opts->{cust} will be FET, $opts->{cotime} will be 'baz'. Setting defaults as I've demonstrated allows you to skip some of the command line args.
-- Therapy is expensive. Popping bubble wrap is cheap. You choose.
In Section
Seekers of Perl Wisdom
|
|