How about rolling your own?
use strict; use warnings; use 5.010; my %ok = qw{-v 1 --verbose 1}; my $verbose = ""; for (@ARGV) { $ok{$_} ? $verbose=1 : say "Unknown option: $_"; } say $verbose --output:-- $ perl 1perl.pl -v 1 $ perl 1perl.pl --verbose 1 $ perl 1perl.pl -V Unknown option: -V $ perl 1perl.pl --v Unknown option: --v
In reply to Re: How can I have both short and long options with Getopt::Long?
by 7stud
in thread How can I have both short and long options with Getopt::Long?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |