in reply to Testing for Truth

Eh? Where's the bug? In the first case, you're seeing if the length is true, and it is (there's one element). In the second case, you're testing the truth of the first element of the array (it's 0), and it's false.

What did you think you were doing instead?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.