in reply to Re^2: Counting the number of items returned by split without using a named array
in thread Counting the number of items returned by split without using a named array
$ perl -MO=Deparse -e '$a = () = split(" ",$_,0)' $a = () = split(" ", $_, 1);
$ perl -MO=Deparse -e '$a = () = split(" ",$_,100000)' $a = () = split(" ", $_, 100000);
Btw - just out of curiosity put this version in the benchmark also - and it's faster than the regexp version, but still slower than $n = @{[ split ]};
I.
|
---|