On Sun, 2008-11-23 at 05:34 -0800, John W. Krahn wrote: > You shouldn't "do something with $line" if $bytes_read is undefined: > > while ( my $bytes_read = read PATTERN, $line, 1920 ) { > unless ( defined $bytes_read ) { > die "error reading $filename: $!"; > } > # do something with $line > } > >
undef is false. -- Just my 0.00000002 million dollars worth, Shawn The map is not the territory, the dossier is not the person, the model is not reality, and the universe is indifferent to your beliefs. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/