In Perl, GetOptions() is defined as a function that is an extended function of Getopt::Long module which is mainly for parsing the command line using various options and this function uses functions that have long names instead of characters which are declared using a double dash (–).
Perl is a case sensitive programming language. Thus $Manpower and $manpower are two different identifiers in Perl.
Getopt::Long is the Perl5 successor of newgetopt.pl . This was the first Perl module that provided support for handling the new style of command line options, in particular long option names, hence the Perl5 name Getopt::Long. This module also supports single-character options and bundling.
GetOptions(
"r|repo=s" => \$repo,
"R|list-repos" => \$list,
);
When I call this script with -r qwe
option, $list
is updated to 1, which is not what I expect.
How can I make GetOpt case sensitive?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With