Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
"be consistent"
 
PerlMonks  

Re: Setting Env Variable question

by amphiplex (Monk)
on Jul 17, 2002 at 12:27 UTC ( [id://182492]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Setting Env Variable question

In order to not get a syntax error, you will have to put the argument to system inside double-quotes:
system ("set $var=$value");
But although I have never used perl on a windows machine, I am pretty sure that this will not do what you want.
I think that you expect to see the variable you set in the script after you have run it. This will propably not happen as the script is running inside a forked shell.
I don't know if there is any way to set the environment of the calling shell.

---- amphiplex

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://182492]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.