in reply to Subroutine evaluated as boolean

It depends on how you return that list.

Because the returned expression is evaluated in the boolean (scalar) context.

The way context is propagated into the sub is one of the peculiarities if Perl5.

Could you show us the code of the return line?

edit

E.g. return $x,$y will be true if $y is true.

But return @x will only be false if @x is empty.

See also Context propagation into subs and evals

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)