One of my all-time favourite nodes, The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan!, shows how to do this with Getopt::Long, which is core. The line that does the job appears in the text and the full example, and is:
pod2usage(-verbose => 1) && exit if ($opt_debug !~ /^[01]$/);
Regards,
John Davies
In reply to Re: Getopt - Validate arguments before processing
by davies
in thread Getopt - Validate arguments before processing
by g_speran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |