Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Re: Using require

by kidd (Curate)
on Jul 10, 2002 at 16:58 UTC ( #180801=note: print w/ replies, xml ) Need Help??


in reply to Re: Using require
in thread Using require

How do I create $option a package?


Comment on Re: Re: Using require
Re: Using require
by Abigail-II (Bishop) on Jul 10, 2002 at 17:03 UTC
    By not creating it a lexical variable. Leave the my off. Of course, you either have to get rid of the strictness, use use vars, or use a fully qualified name.

    Abigail

      I have $option without the my and added the use vars; inside the config.pl...

      Still doesnt work, maybe Im doing something wrong...

        Well, you don't shows it what you did, nor the error message you got, so it's hard to respond. However, you say use vars;, which suggest you are not using this pragma right. Do you know what use vars does? If not, why do you use it in your program? Never, ever use something in your program just because you heard it on Perlmonks, read it in the newspaper, or saw in on television. First read the manual page - and only when you understand you are allowed to use it.

        Abigail

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-12-25 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls