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

Re: catching output

by AgentM (Curate)
on Mar 04, 2001 at 02:22 UTC ( [id://62056]=note: print w/replies, xml ) Need Help??


in reply to catching output

Use backticks to capture STDOUT from the program.
my $captured=`/sbin/ifconfig ppp01`;
Several other modules are also well suited to the purpose, for example, the IPC::Open series. By the way, you should familiarize yourself with the differences bewteen fork, exec, and system. The exec above completely nukes your program and runs ifconfig instead at that point it is called.
AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found