in reply to Re: different return type for split
in thread different return type for split

$count = /\s/ for ($txt);
I had to stare at that three times before I got what you were doing. It was the $count variable, which isn't a count. It's merely true/false, if $txt contains a space or not.

Perhaps what you were reaching for is:

$count = () = /\s/g for $txt;

-- Randal L. Schwartz, Perl hacker