in reply to truth in while condition
You haven't chomped the newline.
johngg@shiraz:~/perl/Monks$ perl -E ' $_ = qq{0\n}; say $_ ? q{True} : q{False}; chomp; say $_ ? q{True} : q{False};' True False
Cheers,
JohnGG
In Section
Seekers of Perl Wisdom