in reply to 2 problems using sockets perl 5.8 and mod_perl2 on Linux

I believe you can only rely on $! being set after you've already detected an error. Otherwise it can contain garbage. In this case, you're dying because there's some garbage in there:
if ($!) { print STDERR "ERROR $!\n"; }
I didn't see it in the documentation, but on my system $nf is set to -1 in the event of an error from select. Checking this instead of $! might fix your problem.

Replies are listed 'Best First'.
Re: Re: 2 problems using sockets perl 5.8 and mod_perl2 on Linux
by Anonymous Monk on Jun 27, 2003 at 15:18 UTC
    Hello,

    I checked and $nf is set to 1 on my machine. Odd.

    I also added code to count the number of times this occurs and it happens thousands of times.

    -rr