- or download this
$ap = Getopt::ArgParse->new_parser(
{
...
description => "Test the Getopt::Argparse module"
}
);
- or download this
$ap->add_argument('-c', '--count', type => 'Scalar');
$ap->add_argument('-f', '--flag', type => 'Bool');
- or download this
$ap->add_argument('--count', '-c', type => 'Scalar');
$ap->add_argument('--flag', '-f', type => 'Bool');
- or download this
if (! defined($args->{'count'})) {
- or download this
if (! defined($args->get_attr('count'))) {
- or download this
if (! defined($args->count)) {
- or download this
#!/usr/bin/perl -w
use strict;
...
if (! defined($args->count)) {
print "count not defined\n";
}