On Fri, Mar 26, 1999 at 12:33:57AM -0000, Efgé wrote:
} Slightly unrelated (maybe), you should never use this
}       while ($line = <STDIN>)
} but instead do
}       while (defined($line = <STDIN>))
} because one day you'll be bitten by <STDIN> returning a single "0"
} and you'll be dead.

That's no longer a problem if you're using a modern perl.  It's been
fixed in perl 5.005_xx so that the first means the second to perl.  I
don't know for sure if it's going to be fixed in the upcoming
5.004_05.

} 
} perl -w should warn you about this BTW.

The warning is gone, too.  On my 5.005_03 machine:

linux% perl -w -e 'while ($line = <STDIN>) {print $line;}'
hello
hello

On my 5.004_04 machine:

cirsrss% perl -w -e 'while ($line = <STDIN>) {print $line;}'            
Value of <HANDLE> construct can be "0"; test with defined() at -e line 65535.



} 
} 
} Florent

-- 
Paul Schinder
[EMAIL PROTECTED]

Reply via email to