in reply to Re^2: forked kid can't read from IO::Select->can_read
in thread forked kid can't read from IO::Select->can_read

Using the <> way of reading from a socket means you're using buffered reading, which is a bad idea when using select, or in this case IO::Select. Instead I would recommend using sysread() to do the actual reading. Now, the nice thing about sysread() is that every time it does a read, it returns the amount of bytes actually read in. So if you were to do for example:
my $scalar; my $bytes = sysread(FILEHANDLE, $scalar, 1024);
and $bytes turns out to be less than 1024, then it's a pretty safe assumption that there's nothing left. If on the other hand you get the full 1024 you can just go ahead and do another read, and so on, and so on.


Remember rule one...