On Fri, Mar 12, 2010 at 2:21 AM, Uri Guttman <[email protected]> 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: [email protected]
Skype: compuperson
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/