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

Re: Setting Env Variable question

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


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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found