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

Fred Morris m3047 at inwa.net
Fri Sep 19 03:52:20 CDT 2003


I wrote:
>As a matter of fact, I just tried your suggestion on an empty file with
>perl v5.8.0 i586-linux-thread-multi (plus SuSE patches) and by golly I got
>Inappropriate ioctl for device.
>
>On 5.005_03 $! is .. well... false.
>
>Anything else I missed here? Yes. The system with 5.5.3 is on an ext2 fs,
>and the system with 5.8.0 is reiserfs. FWIW.

Just made an ext2 partition on the very same box which has reiserfs (SuSE
8.2, Perl 5.8.0, patches) and tried the empty file test. Same error,
Inappropriate ioctl for device. In an attempt at falsifiability, deleted
the file and the error is No such file or directory on open (not read). I
think that rules out reiserfs.

The entirety of the program:

#!/usr/bin/perl -w
use strict;

open (FOO, 'foo') or die "open: $!";

my @lines = <FOO> or die "reading: $!";

close FOO or die "close: $!";

__END__

(for YS-T)

--

Fred Morris
m3047 at inwa.net





More information about the spug-list mailing list