Perl Getopt::Long Related Question - Mutually Exclusive Command-Line Arguments
问题 I have the following code in my perl script: my $directory; my @files; my $help; my $man; my $verbose; undef $directory; undef @files; undef $help; undef $man; undef $verbose; GetOptions( "dir=s" => \$directory, # optional variable with default value (false) "files=s" => \@files, # optional variable that allows comma-separated # list of file names as well as multiple # occurrenceces of this option. "help|?" => \$help, # optional variable with default value (false) "man" => \$man, # optional