http://www.perlmonks.org?node_id=748312


in reply to Re: return !!
in thread return !!

Not quite.

$ perl -wle'print 0 + sub { my @v; !!@v }->()' 0 $ perl -wle'print 0 + sub { my @v; @v ? 1 : "" }->()' Argument "" isn't numeric in addition (+) at -e line 1. 0

And it doesn't return zero for false either.

$ perl -wle'print "" . sub { my @v; !!@v }->()' $ perl -wle'print "" . sub { my @v; @v ? 1 : 0 }->()' 0

False is actually dualvar(0, '')