http://qs1969.pair.com?node_id=62568


in reply to (redmist) Re: Reading a file
in thread Reading a file

Maybe:
open OUT,'|program' or die $!; open IN,'file.txt' or die $!; #if you don't need to process each line...I don't see why not printing + all the lines at once like: print OUT <IN>; #but if you must print one line at a time: while(<IN>){ #do whatever you want with the line. print OUT $_; } close OUT; close IN;