nysus has asked for the wisdom of the Perl Monks concerning the following question:
I was studying someone else's code and came across this line:
GetOptions( "refresh=i" => \ (my $REFRESH = 10), ...other option variables... );
I'm confused by the syntax of this line. It is nowhere to be found in the module documentation. According to the module, the "=" sign in "refresh=i" makes the option mandatory in the command line. So if that's the case, why does the argument above appear to be assigning a value to "$REFRESH"?
Respectfully Yours,
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot";
$nysus = $PM . $MCF;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "Getoptions'" argument syntax
by wog (Curate) on Jun 15, 2001 at 23:36 UTC | |
by nysus (Parson) on Jun 15, 2001 at 23:42 UTC | |
by Anonymous Monk on Jun 16, 2001 at 00:29 UTC | |
|
Re: "Getoptions'" argument syntax
by btrott (Parson) on Jun 16, 2001 at 00:15 UTC | |
|
Re: "Getoptions'" argument syntax
by mikfire (Deacon) on Jun 16, 2001 at 00:08 UTC | |
by wog (Curate) on Jun 16, 2001 at 00:15 UTC |