Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: wants to export global variable

by Loops (Hermit)
on Apr 04, 2013 at 08:18 UTC ( #1026949=note: print w/ replies, xml ) Need Help??


in reply to wants to export global variable

You can't change the environment of the calling process directly. You would have to arrange for that process to call your perl program and stuff whatever it prints into the environment variable of your choice

You can change the environment variables of any child process you call:

$ENV{'hello'}='goodbye'; system('echo greetings from the shell, $hello');

Much of this has been discussed in other threads. Here is one, Set shell environment variables from within a perl script


Comment on Re: wants to export global variable
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2014-09-20 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls