# first start the process
open(READ,'ls /root/Desktop/proba/ |');
# and now read the output from that process one line at a time
print "Start of output from ls command\n";
while(<READ>){
# for this example I'm just going to print each line from ls
[tab]print $_, "\n";
}
print "end of output from ls command\n";