start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: getopt Chapter 8
Standard Modules
Next: 8.87 Getopt::Std
 

getopts

getopts ('

switches

'[, \%

opts

])

Like getopt , except that all valid options are included in switches and options that take an argument are followed by a colon ( : ), e.g.:

getopt('oDI')    # -o, -D, & -I take arguments; there may be other options getopts('o:DI')  # -o, -D, and -I are the only valid options; only -o                  # takes an argument
\%opts means the same as with getopt .


Previous: Reference: getopt Perl in a Nutshell Next: 8.87 Getopt::Std
Reference: getopt Book Index 8.87 Getopt::Std