App-GetoptLongExamples
view release on metacpan or search on metacpan
script/getopt-long-sample-implicit-dest-hash-storage view on Meta::CPAN
use warnings;
use Getopt::Long qw(:config gnu_getopt no_ignore_case);
use Data::Dump;
my %opts;
GetOptions(
\%opts,
'foo=s',
'bar=s' => \$opts{not_bar},
'baz=s',
'help|h' => sub {
print <<'_';
Usage:
getopt-long-sample-implicit-dest [[--foo=s] [--bar=s] [--baz=s]] | [--help|-h]
_
exit 0;
},
);
( run in 0.469 second using v1.01-cache-2.11-cpan-cc502c75498 )