- or download this
#!/usr/bin/perl -w
use strict;
...
my $ops = Getopt::Declare->new($spec);
# rest of your program
- or download this
#!/usr/bin/perl -w
use strict;
...
}
__END__
- 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.
- or download this
-p <var:s> # accept strings
-n <var:n> # accept any real number
-i <var:i> # accept only integers
- or download this
-hw <hw:/\d+x\d+$/> HeightxWidth coordinates
#or
[pvtype: coord /\d+x\d+$]
-hw <hw:coord> HeightxWidth coordinates
- or download this
$ perl dopt.pl -v
...
-f <INFILE>... input filename(s)
-not print out non-matches