in reply to Concordance Generator

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.

Replies are listed 'Best First'.
Re: Re: Concordance Generator
by sifukurt (Hermit) on Aug 15, 2001 at 01:40 UTC
    Thank you. Yes, that's exactly what I was doing. I've incorporated the change into the posted code.
    ___________________
    Kurt