in reply to Re: Error Message in Closing File
in thread Error Message in Closing File

No, you have that wrong.

The OP is using lexical filehandles and the three argument form of open which is perfectly correct from perl 5.6.x onwards.

Cheers,

JohnGG