I/O status Re: SPUG: proper checking of file status after read?

Yitzchak Scott-Thoennes sthoenna at efn.org
Fri Sep 19 04:32:10 CDT 2003


On Thu, Sep 18, 2003 at 08:12:48PM -0700, Fred Morris <m3047 at inwa.net> wrote:
> 
> And it's not just "any value", it's an ioctl.. every time.

I've seen an explanation of this, somewhere...it might depend on
whether you give perl the script name as a relative or absolute path.
But this just demonstrates that you can't check $! without knowing
that there was an error.

> Am I a flipper baby for wanting to be able to check for I/O read status?
> Does nobody do this? Wow.

I've seen the question come up half a dozen times or so on various lists,
so you're not the only one.  You can check !eof(FILE) and then check $!,
but that doesn't work very well for terminal input.



More information about the spug-list mailing list