Think about Loose Coupling | |
PerlMonks |
Re: Concordance Generatorby chipmunk (Parson) |
on Aug 14, 2001 at 06:14 UTC ( [id://104661]=note: print w/replies, xml ) | Need Help?? |
I can guess that you declared yout $opt_... variables with my(). Since my() scopes the variables to the lexical block, the variables you declared are not visible to Getopt::Std.
Instead, you should declare the variables with use vars: use vars qw($opt_h $opt_s); (In perl5.6, you could declare them with our instead.) Alternatively, you could switch to Getopt::Long, which allows you to specify whatever variables you want to get the values of the options. It has other useful features as well.
In Section
Cool Uses for Perl
|
|