[OT] perl file handle question

Simon Cozens simon at simon-cozens.org
Sat Mar 22 12:54:23 GMT 2008

Nicholas Clark wrote:
> However, what I'd then like to do is
> close_or_die($fh);
> and if the close fails, have the file *name* printed in the error message.

Do you need it to be portable?

This answer brought to you by the keywords readlink, fileno, and 

;print eval;

More information about the london.pm mailing list