in reply to writing files while reading files
open(READER, "file1") || die "$!"; open(WRITER, "+<file2") || die "$!"; while(<READER>) { chomp; munge($_); mutilate($_); print WRITER "$_\n"; # Note the filehandle argument to print. }
In Section
Seekers of Perl Wisdom