in reply to Re^4: How to remove the actual glob from a glob reference
in thread How to remove the actual glob from a glob reference

You probably want
if (!eof($a)) ...

Dave.

Replies are listed 'Best First'.
Re^6: How to remove the actual glob from a glob reference
by targetsmart (Curate) on Jan 02, 2009 at 13:46 UTC
    eof() will check for next read on filehandle will return end of file, is there any function to check whether the next write on the filehandle will return end of file?.

      A write will never return end of file, it'll return an error. On my system, it's error 9, "Bad file descriptor". Are you asking how to check if the file is still opened? if defined(fileno($a))