in reply to
Testing for Truth
Your first one tests for scalar @$foo and is true because @$foo contains 1 element. Your second test is for the value of the first element of the array which is 0, or false.
Comment on
Re: Arefs: Testing for Truth:
In Section
Seekers of Perl Wisdom