Help for this page

Select Code to Download


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