Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: main and external script

by gu (Beadle)
on Dec 02, 2005 at 18:52 UTC ( [id://513689]=note: print w/replies, xml ) Need Help??


in reply to main and external script

At compile time, $verbose is used only once...

To fix your problem you can write :
#!/usr/bin/perl -w BEGIN{require "config.conf"} ; print $verbose ;
But as ikegami said do is better. Furthermore, you should write our $verbose = 1; in the required file to give it an appropriate scope.

Gu

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 06:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found