On Tue, Jun 28, 2005 at 06:25:31PM -0000, Justin Mason wrote: > However, there is one key difference: "while (<$io>)" and "while > ($io->getline)" ha ve different behaviour. If the last line of an input > file > contains "0" (with no trailing newline), "while (<$io>)" will read it and > perform an iteration of the while loop, but "while ($io->getline)" will read > it, consider it a false value, and instead break out of the while loop.
Confirmed. while(<FH>) must have some sort of special case to consider "0" true to avoid this sort of gotcha. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Just call me 'Moron Sugar'. http://www.somethingpositive.net/sp05182002.shtml