in reply to Re: Re: What is the correct way to use Thread::Queue::Any ?
in thread What is the correct way to use Thread::Queue::Any ?

while( my($returned_value) = $queue->dequeue ) {

You forget that $queue->dequeue always returns an array with at least 1 element. So the condition being checked is always 1 or higher. Something like:

while( my ($returned_value) = $queue->dequeue ) { last unless defined $returned_value;
should do the trick, I think.

Liz