in reply to Setting default values in getopts

You can't redeclare a variable with my as you are doing. In fact, the better way to declare %opt is with use vars, like so:
use vars qw(%opt); $opt{d} = "x"; $opt{a} = "0"; $opt{s} = "0"; $opt{e} = "x"; getopts("dase:", \%opt);
Good luck!

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: Setting default values in getopts
by neilwatson (Priest) on Mar 27, 2002 at 15:06 UTC