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

Re: EXPORT variables

by friedo (Prior)
on Jun 09, 2008 at 22:04 UTC ( #691110=note: print w/replies, xml ) Need Help??

in reply to EXPORT variables

export is a bash builtin and not meant to be called from Perl. If you want to altar your process's environment variables, you can do it by modifying the %ENV hash. (See perlvar). For example, $ENV{PATH} = '/home/abc/xyz/bin:' . $ENV{PATH};

Replies are listed 'Best First'.
Re^2: EXPORT variables
by sonalig (Acolyte) on Jun 09, 2008 at 22:24 UTC
    Thanks, Friedo. I am doing the following in the script:
    export PATH; Run a command that requires the above exported PATH.
    When running the script it says, "cannot execute. No file or directory". I am using backticks to execute the command. I tried using system and it didn't work either. Am I missing something? Also,Is there a way to run cp, mv commands of bash from perl scripts?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://691110]
roho replaces stale cookies with fresh on the platter on the sideboard.
roho takes a cookie from the platter on the sideboard.
roho takes a handful of cookies from the platter on the sideboard.
roho gets a cup of tea to dunk cookies.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-04-27 09:47 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (502 votes). Check out past polls.