This is exactly the code which bit me on Linux not too long ago:
At 2:49 PM 11/5/03, Thomas R Wyant_III wrote:
$! = 0; # Are you superstitious?
>while (<>) {
># do something useful
>}
>die $! if $!;
Turned out that on the SuSE 8.2 kernel, with Perl 5.8, open was attempting
some ioctl intended for a sound device. It successfully opens the files,
but it leaves $! set. After receiving much advice, I finally ignored it all
and took the easy way out: set $! = 0 after a successful open. Academically
speaking, if you really wanted to know what was going on you'd need to haul
out FileHandle:: or Posix::... at least that's the working hypothesis.
--
Fred Morris
[EMAIL PROTECTED]