This works for me:
$ cat 3perl.pl use strict; use warnings; use 5.010; use Getopt::Long; Getopt::Long::Configure(qw{no_auto_abbrev no_ignore_case_always}); my $verbose = ""; GetOptions ('verbose|v' => \$verbose); say $verbose;
$ perl 3perl.pl -v 1 $ perl 3perl.pl -V Unknown option: V $ perl 3perl.pl -verbose 1 $ perl 3perl.pl -Verbose Unknown option: Verbose $ perl 3perl.pl -ver Unknown option: ver
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: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |