- or download this
use Getopt::Hash;
my %opt = GetOptions(
...
if ($opt{'option_name'} eq 'some_value') {
## do work ##
}
- or download this
use Getopt::Long;
my %opt = (
...
if ($opt{'option_name'} eq 'some_value') {
## do work ##
}
- or download this
'getopt_spec_string' => 'default_value'
- or download this
my %opt = GetOptions(
'option_name|on:s' => 'default_value',
'element|e!' => 0,
'count|cnt|c=i' => 5,
);
- or download this
'option_name' => 'default_value',
'element' => 0,
'count' => 5,
- or download this
package Getopt::Hash;
use strict; use warnings;
...
=cut