in reply to Perl Log file error

You already have an answer by suhailck. However I would also like to point out that you should close the file handles after you are finished with writing.

close($OUTF);