Confused by sysread()

Yitzchak Scott-Thoennes sthoenna at
Mon Apr 9 22:52:10 BST 2012

On Mon, Apr 9, 2012 at 2:32 PM, Roger Burton West <roger at> wrote:
> Under Linux amd64 and Perl 5.10.1, I'm trying to read from a pair of
> devices which will produce data in 16-byte blocks. (I can cat the device
> files - as the same user - and verify that they do this.)
> Under Perl 5.8 (and an earlier i386 Linux), this worked. Now sysread()
> is failing with an "Invalid argument".

You've probably switched from perl using stdio to using perlio.  You
could compile 5.10.1 with usestdio to see if that makes a difference.
Or you could try a newer perl and see if this is a bug that perhaps
has been fixed?

Which strikes a vague bell...does it help to say: my $data = '';

More information about the mailing list