Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Concordance Generator

by chipmunk (Parson)
on Aug 14, 2001 at 06:14 UTC ( [id://104661]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://104661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-26 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found