my $second_file, my $counter etc are also good ideas.
Try print $second_file just before the open statement. Does it actually contain a filename?
Appears you're opening this file for output only. That's going to clobber whatever you got in there, so the next couple of <FH_SECOND> will have nothing to read as the file is opened for writing only - those lines will actually generate warnings.
Is the file actually "writable"? (Though I'm quite sure that's not your intention). When you do fix your open statement, ensure that the file's permissions are appropriate.
In reply to Re: File Handling problem
by charlesboyo
in thread File Handling problem
by girish_01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |