Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-09-21 07:20 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (242 votes). Check out past polls.