Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Re: Re: Sharing Global variables between scripts

by gjb (Vicar)
on Apr 16, 2004 at 22:40 UTC ( #345899=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Sharing Global variables between scripts
in thread Sharing Global variables between scripts

Thanks to a short CB exchange I now see what you have in mind. You're using a system call to execute from within

So yes, the variables still exist, but unfortunately you can't access them from within</ocde> since both scripts are running in their own Perl interpr +eter and don't share anything.</p> <p>The best thing to do I guess is to transform <code>
into a function and call that from within by directly including it in that file. The advantage is that you can make $project et al. parameters of that function which is much cleaner.

You can also put that function into a module and load it with use.

Hope this helps, -gjb-

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2016-10-21 00:31 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (284 votes). Check out past polls.