Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 having an uproarious good time at the Monastery: (12)
As of 2016-09-27 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (513 votes). Check out past polls.