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

Re^3: accessing an environment variable dynamically

by Tommy (Chaplain)
on Jan 01, 2013 at 21:36 UTC ( #1011185=note: print w/ replies, xml ) Need Help??


in reply to Re^2: accessing an environment variable dynamically
in thread accessing an environment variable dynamically

Ok, so here's what you want to do: listen to BrowserUK who is brilliant with Perl on Windows. BrowserUK is right that you need to focus on the value of $? after you run your system call. Personally, I like to dig a little deeper and avoid the shell as much as possible when running system commands, so I use IPC::Open3, for example.

But for your project here, using the system() command or qx{} will probably serve you just fine. Read the perldoc -f system documentation, and you'll see it's quite doable.


Comment on Re^3: accessing an environment variable dynamically
Download Code
Re^4: accessing an environment variable dynamically
by Anonymous Monk on Jan 02, 2013 at 00:28 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-09-16 05:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls