use warnings; use strict; use Getopt::Long; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %opt; GetOptions(\%opt, qw( help cfg=s verbose silent dir=s )) or die "Mandatory options not supplied\n"; print Dumper(\%opt); __END__ script.pl -h -v $VAR1 = { 'help' => 1, 'verbose' => 1 };
In reply to Re: How to find what options are used for Getopt::Long
by toolic
in thread How to find what options are used for Getopt::Long
by doubledecker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |