Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yeah, the Getopt::Long convention for switches with multiple arguments would be to specify the same switch multiple times on the call, like:
Since it seems that's not an option, (apologies for the pun) you can still use Getopt::Long, but I think you'll need to do something a little less nice. Maybe like:
This reaching into @ARGV has the obvious side effect of potentially breaking further option processing if the number of options isn't exactly what you expect. You could easily add you own logic to the processing functions though. (The initial shift discards the first parameter, which is the option itself (-x, -y, etc))
Xaositect - Whitepages.com In reply to Re: -x accepts up to 3 additional arguments
by Xaositect
|
|