From: Jarkko Hietaniemi Date: Tue, 21 May 2002 23:02:03 +0000 (+0000) Subject: Getopt::Std clarification from John Borwick. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b946c1ed5726bfcc464a040aa1acac0df1395c5;p=p5sagit%2Fp5-mst-13.2.git Getopt::Std clarification from John Borwick. p4raw-id: //depot/perl@16728 --- diff --git a/lib/Getopt/Std.pm b/lib/Getopt/Std.pm index 1e6413b..4599ec5 100644 --- a/lib/Getopt/Std.pm +++ b/lib/Getopt/Std.pm @@ -23,9 +23,9 @@ getopts - Process single-character switches with switch clustering The getopt() function processes single-character switches with switch clustering. Pass one argument which is a string containing all switches that take an argument. For each switch found, sets $opt_x (where x is the -switch name) to the value of the argument, or 1 if no argument. Switches -which take an argument don't care whether there is a space between the -switch and the argument. +switch name) to the value of the argument if an argument is expected, +or 1 otherwise. Switches which take an argument don't care whether +there is a space between the switch and the argument. The getopts() function is similar, but you should pass to it the list of all switches to be recognized. If unspecified switches are found on the