GetOptions(
"r|repo=s" => \$repo,
"R|list-repos" => \$list,
);
当我用
-r qwe
调用这个脚本时选项,$list
更新为 1,这不是我所期望的。如何使 GetOpt 区分大小写?
最佳答案
use Getopt::Long qw(:config no_ignore_case);
关于Perl GetOptions() 区分大小写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5408357/