in reply to How do i read each line of the file into string?

If you have enough RAM:
undef $/; $file = <>; s/\s*\n/,/s; #catches spaces as well. print;
If not:
chomp; print; print ',' while ( <> );
(I didn't worry about trailing comma's)

Jeroen
"We are not alone"(FZ)