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.:
\%opts means the same as withgetopt('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
getopt
.Copyright © 2001 O'Reilly & Associates. All rights reserved.