Help for this page

Select Code to Download


  1. or download this
           = type [ desttype ] [ repeat ]
               The option requires an argument of the given type. Supporte
    +d types are:
    
               s   String. An arbitrary sequence of characters. It is vali
    +d for the argument
                   to start with "-" or "--".
    
  2. or download this
    use warnings;
    use strict;
    ...
    if ( (exists $opt{name}) and ($opt{name} =~ /^-/) ) {
        die "Option name requires an argument\n";
    }
    
  3. or download this
    my %opt;
    my @string_opts = qw(name foo|goo bar);
    ...
            die "Option $oname requires an argument\n";
        }
    }