F:\_Perl_\pl_test>F:\_Perl_\pl_test\930268.pl $outfile is now F:/_Perl_/pl_test/abcd.out Could not open *main::$OUTFILE using $outfile (dev/nul/xyz.out), No such file or directory at F:\_Perl_\pl_test\930268.pl line 12. $outfile is now dev/nul/xyz.out print() on closed filehandle $OUTFILE at F:\_Perl_\pl_test\930268.pl line 14. Problem is with $outfile: dev/nul/xyz.out ---------- 2nd vers using lc $outfile in the 'die' $outfile2 is currently F:/_Perl_/pl_test/abcd2.out $outfile2 is currently dev/nul/pqrst.out Could not open dev/nul/pqrst.out using $outfile2, No such file or directory at F:\_Perl_\pl_test\930268.pl line 25. print() on closed filehandle $OUTFILE2 at F:\_Perl_\pl_test\930268.pl line 26. Problem is with $outfile2: dev/nul/pqrst.out 10/08/2011 09:06a 22 abcd.out # content as expected from the code above 10/08/2011 09:06a 27 abcd2.out # " 2 File(s) 49 bytes