note
dchetlin
That's not a list, that's the binary comma operator. Any non-empty list is true. It may look like a list, but it's not one.
<p><strong>UPDATE:</strong>
<p>Hmm, "Any non-empty list is true" was a dumb thing to say, as tye and tilly pointed out.
<p>It reminds me of an MJD quote:
<p>"If there is a giant purple water buffalo returned from a function,
then $h = func() will always give you the length of its nose."
<p>In other words, any non-empty list is true because you never have a list in boolean context.
<p>However, I do stand by my first and third sentences in the original post. I think it's misleading to say <CODE>if (1,0)</CODE> or even <CODE>if @array[0,2,1]</CODE> is a list.
<p>It is, obviously, a complicated topic.
33638
33670