in reply to Re^2: readline succeeds but sets $! = EBADF
in thread readline succeeds but sets $! = EBADF
First, why not use eof to check for an end-of-file condition?
Second, a common way to handle this situation is to close the filehandle after readline returns undef, and see if the close fails. If it does, there was some kind of error handling the file.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: readline succeeds but sets $! = EBADF
by ambrus (Abbot) on Aug 31, 2004 at 10:18 UTC |