Think about Loose Coupling | |
PerlMonks |
GetOpts::long Multiple Parameters per optionby PyrexKidd (Monk) |
on Feb 06, 2011 at 22:47 UTC ( [id://886569]=perlquestion: print w/replies, xml ) | Need Help?? |
PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question: Hello all,
Initially I wrote the script to take one parameter per switch.
To take two parameters I added the line:
this works great if the parameters are passed in order:
but if I switch the order that I call the options the in the reverse order the second parameters are passed to the wrong sub:
Can anyone suggest a method for taking two parameters from the command line?
Back to
Seekers of Perl Wisdom
|
|