Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Setting Environment Variables in Linux

by szbalint (Friar)
on Nov 12, 2005 at 02:08 UTC ( #507914=note: print w/replies, xml ) Need Help??


in reply to Setting Environment Variables in Linux

An effective solution doesn't necessarily mean Perl in this case.

PATH is most likely set, assuming you're using bash by the file .bash_profile for login shells or by .bashrc for non-login shells in your home directory.

By the description I was assuming that you were interested in setting the PATH for your shell use.

From perldoc perlvar: "$ENV{expr} - The hash %ENV contains your current environment. Setting a value in "ENV" changes the environment for any child processes you subsequently fork() off."

This means a script cannot modify the ENV for it's parent shell, only for it's children processes. A shell is a script's parent process.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2018-10-22 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When I need money for a bigger acquisition, I usually ...














    Results (119 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!