I think this (letting perl close file automatically) is a bad idea.
It does happen on NFS that close returns an error (when net connection breaks or quota is exceeded). (It can also happen if the disk is full or physically bad.) But Perl only gives a severe warning in this case, not an error, so if you don't see the warning (because cgi script or
scrolled out of screen by make's messages), it will seem that it's run normally.