idunno has asked for the wisdom of the Perl Monks concerning the following question:
But when I run the program with script.pl -i 2, $opt_i doesn't have a value. What am I doing wrong? Thanks.use Getopt::Std; use strict; my $opt_i; getopt('i'); print "Increment value is $opt_i\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using getopt
by grep (Monsignor) on Jan 24, 2002 at 04:37 UTC | |
by idunno (Beadle) on Jan 24, 2002 at 04:49 UTC | |
by FoxtrotUniform (Prior) on Jan 24, 2002 at 22:38 UTC | |
|
Re: Using getopt
by impossiblerobot (Deacon) on Jan 24, 2002 at 07:00 UTC | |
|
Re: Using getopt
by FoxtrotUniform (Prior) on Jan 24, 2002 at 04:35 UTC | |
|
Re: Using getopt
by grep (Monsignor) on Jan 24, 2002 at 05:12 UTC |