On Fri, Mar 12, 2010 at 2:21 AM, Uri Guttman <u...@stemsystems.com> wrote:

> empty lines (a single newline) is always true. the defined case only
> handles the odd trailing partial line with just '0' in it. it is the
> only way a <> without defined would lose some data as it is false.
>

No. Even having just 0 in a line won't make the line lost without defined.

$ perl -e 'print "1\n2\n3\n0"' > a.txt

$ perl -e 'open FD,"a.txt"; while(my $line=<FD>) { print $line }'
1
2
3
0


-- 
Jeff Peng
Email: jeffp...@netzero.net
Skype: compuperson

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to