Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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.

Replies are listed 'Best First'.
Re^4: accessing an environment variable dynamically
by Anonymous Monk on Jan 02, 2013 at 00:28 UTC

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2016-10-25 14:29 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (320 votes). Check out past polls.