in reply to "Getoptions'" argument syntax
Quick experimentation suggests that it provides a default value for an optional parameter. Which is really quite neat, and seems to be completely undocumented.borris)cat getopt.pl #!usr/bin/perl -w use Getopt::Long; use strict; GetOptions( "refresh=i", \ (my $refresh = 10 ) ); print "refresh = $refresh\n"; borris)perl getopt.pl refresh = 10 borris)perl getopt.pl -refresh 5 refresh = 5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: "Getoptions'" argument syntax
by wog (Curate) on Jun 16, 2001 at 00:15 UTC |