Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Getopt::Declare

by danger (Priest)
on Feb 02, 2001 at 22:25 UTC ( #56048=modulereview: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    my $ops = Getopt::Declare->new($spec);
    
    # rest of your program
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    }
    __END__
    
  3. or download this
        -f <INFILE>...
        # So we specify an option that looks like '-f' which takes one or
    ...
        # executed until all the command line options have been parsed.
        # Here we merely provide our own function and pass it the files
        # from the -f option as arguments.
    
  4. or download this
        -p <var:s> # accept strings
        -n <var:n> # accept any real number
        -i <var:i> # accept only integers
    
  5. or download this
        -hw <hw:/\d+x\d+$/>        HeightxWidth coordinates
    #or
        [pvtype: coord /\d+x\d+$]
        -hw <hw:coord>        HeightxWidth coordinates
    
  6. or download this
    $ perl dopt.pl -v
    
    ...
            -f <INFILE>...          input filename(s)  
    
            -not                    print out non-matches
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: modulereview [id://56048]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-07-24 11:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (160 votes), past polls