Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Reading console output into a perl

by duct_tape (Hermit)
on Nov 25, 2003 at 21:57 UTC ( #310074=note: print w/replies, xml ) Need Help??


in reply to Reading console output into a perl

system returns the exit status of the program not the output. To retrieve the output of it, you can use backticks.

$myVar = `C:\\configInfo.exe`; print "output: $myVar\n";
Hope that helps.
Brad

update: double'd backslashes.. whoops. Thanks Corion.

Replies are listed 'Best First'.
Re: Re: Reading console output into a perl
by Anonymous Monk on Nov 25, 2003 at 22:04 UTC
    Awesome, Exactly what I needed to know, thanks.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2019-09-21 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (273 votes). Check out past polls.

    Notices?