I'm staring at this code in perl LWP::Protocol.pm and I don't understand how the loop would ever exit:
while ($content = &$collector, length $$content) {
$content_size += length($$content);
# more here
}
In my interpretation, I am thinking this is a list of 2 elements in scalar context, so the result that the while loop is testing is the length of the list, which is always 2 and never false. How does this really work?