Syntactic Confectionery Delight | |
PerlMonks |
Re: -x accepts up to 3 additional argumentsby Xaositect (Friar) |
on Jun 23, 2005 at 17:29 UTC ( [id://469464]=note: 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 Section
Seekers of Perl Wisdom
|
|