Jul 17, 2015, 6:19 AM
Use a lexical hash instead of the global $opt_ vars.
Re: [cjsmall] Is it possible to use '?' as an option to &Getopts()?
Personally, I think the Getopt::Long module coupled with Pod::Usage would be a better choice than Getopt::Std.
my $man = 0;
my $help = 0;
GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
pod2usage(1) if $help;
pod2usage(-exitval => 0, -verbose => 2) if $man;
(This post was edited by FishMonger on Jul 17, 2015, 6:20 AM)