Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

getopt getopt (' switches '[, \% opts ]) Description switches is a string of the command-line options that take arguments. For each option, getopt sets $opt_ x (where x is the switch) to the value entered as an argument. If \%opts is specified, it is a reference to a hash in which getopt sets the key to the name of the switch and the value to the argument (and the $opt_ variables are not set). getopts getopts (' switches '[, \% opts ]) Description 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') getopts('o:DI') # -o, -D, & -I take arguments; there may be other options # -o, -D, and -I are the only valid options; only -o # takes an argument \%opts means the same as with getopt . I18N::Collate