|
|
| more useful options | |
| PerlMonks |
Re: Range in Getoptby dasgar (Chaplain) |
| on Oct 03, 2012 at 06:48 UTC ( #996993=note: print w/ replies, xml ) | Need Help?? |
|
Here's my typical approach to using Getopt::Long. First I assign a default value to the variables that will be used in GetOptions(). Then I test the values of those variables. If they are acceptable values, proceed. Otherwise, stop and give an error message. Applied to your question, here's what my (untested) code would look like:
Might not be the best or more elegant solution, but it should work and it makes sense to me.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||