neilwatson has asked for the wisdom of the Perl Monks concerning the following question:
Givers of wisdom and knowledge please consider my humble questions:
How does one set default values of command line arguements?
use Getopt::Std; my %opt; my $opt{d} = "x"; my $opt{a} = "0"; my $opt{s} = "0"; my $opt{e} = "x"; getopts("dase:", \%opt);
Using something like this returns a syntax error at my $opt{d}="";. What have I done wrong?
Neil Watson
watson-wilson.ca
|
---|
Replies are listed 'Best First'. | |
---|---|
(jeffa) Re: Setting default values in getopts
by jeffa (Bishop) on Mar 27, 2002 at 15:01 UTC | |
by neilwatson (Priest) on Mar 27, 2002 at 15:06 UTC | |
Re: Setting default values in getopts
by Fletch (Bishop) on Mar 27, 2002 at 15:05 UTC | |
Re: Setting default values in getopts
by maverick (Curate) on Mar 27, 2002 at 17:29 UTC |
Back to
Seekers of Perl Wisdom