in reply to Multiple File Handles

Hmm... It looks like you're reading from the file name rather than the file handle. Your loop should look like this, I think:

my ($bytesread, $buffer); # better to declare outside the loop while ($bytesread = read(OUTFILE2, $buffer, 1024)) { print OUTFILE $buffer; }
I have to question the wisdom of calling a filehandle OUTFILE2, then reading from it....

HTH