Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: UNIX environment setup via perl

by haoess (Curate)
on May 07, 2004 at 15:05 UTC ( #351476=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: UNIX environment setup via perl
in thread UNIX environment setup via perl

You can't manipulate environment variables for your parent processes. Why? It's a security concern.

But: Your shell can use the output of your perl programm to set it's own environment:

# perl -lw print "export FOO=bar"; # assuming bourne-compatible shell

Later in your (parent) shell:

$ eval `your_perl_script.pl` $ echo $FOO bar $

-- Frank

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2016-06-30 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (396 votes). Check out past polls.