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