Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
pretty amazing, that "optimization":
BUT:
so it's not completely impossible to use it with split, just limited to a fixed maximum number of fields in the split. It's a bit unsuspected (at least for me) though, that an explicit split(" ",$_,0) was 'optimized' also. 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. In reply to Re^3: Counting the number of items returned by split without using a named array
by Anonymous Monk
|
|