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
Back to
Seekers of Perl Wisdom