Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Your list statement is incorrect:
Otherwise you are right. The false scalars are: Truth is evaluated in void (essentially scalar) context so something that looks like a list (array, hash, etc) is coerced into a scalar before the boolean test.
EDIT But note that when I said "looks like a list" I used that phrase very, very carefully. Many list-like things exist in Perl, but there is no list per se. For an earlier post of mine on this exact topic try Arrays are not lists. I would give an array slice example, but tye gave a better one than the one I was going to do... :-) In reply to RE (tilly) 2: What are all the false values in Perl ((conditional
by tilly
|
|