Search code examples
perlcase-sensitivegetopt

Perl GetOptions() case sensitivity


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?


Solution

  • use Getopt::Long qw(:config no_ignore_case);