Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Reading console output into a perl

by duct_tape (Hermit)
on Nov 25, 2003 at 21:57 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://310074]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found