in reply to Parsing large files

binmode() both input and output filehandles and your code should work.

--perlplexer