cutter has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Getopt::Std; # my $opt_J="file"; # my $opt_f="file"; # my $opt_s="status"; # my $STATUS="stat"; getopts("J:f:s:"); if ($opt_J) { print "Writing output to $opt_J \n"; } if ($opt_f) { print "Writing output== to $opt_f \n"; } if ($opt_s) { print "Status $opt_s \n"; } #my $STATUS="AC"; #my $STATUS; $STATUS=$opt_s; print "Status is $STATUS \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: use strict with Getopt::Std
by rjray (Chaplain) on Mar 19, 2003 at 22:02 UTC | |
by particle (Vicar) on Mar 20, 2003 at 13:36 UTC | |
by rjray (Chaplain) on Mar 20, 2003 at 22:21 UTC | |
by Anonymous Monk on Mar 27, 2015 at 18:26 UTC | |
|
Re: use strict with Getopt::Std
by larsen (Parson) on Mar 19, 2003 at 21:51 UTC | |
by cutter (Acolyte) on Mar 19, 2003 at 22:01 UTC | |
|
(jeffa) Re: use strict with Getopt::Std
by jeffa (Bishop) on Mar 19, 2003 at 22:01 UTC |