Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: catching output

by AgentM (Curate)
on Mar 04, 2001 at 02:22 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2022-01-26 17:27 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (69 votes). Check out past polls.