Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How do I store and manipulate the output from another process?

by vroom (His Eminence)
on Jan 25, 2000 at 22:00 UTC ( [id://2434]=note: print w/replies, xml ) Need Help??


in reply to How do I store and manipulate the output from another process?

Your best choices for collecting output from a program are using backticks `` or the open call.
$output=`tar -tf`; #collects all the output from the "tar -tf" comman +d open TAR, "tar -tf|"; #open a process with a pipe on the right side while(<TAR>){ #get the output line by line into $_; do_something($_); #process the results; } close TAR;
  • Comment on Re: How do I store and manipulate the output from another process?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-19 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found