Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Getopt::Declare

by danger (Priest)
on Feb 02, 2001 at 22:25 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: modulereview [id://56048]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 07:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found