"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
That'll teach me to try and one-line my original solution.:( For what it's worth, I didn't say that the last one would be more efficient, but I did say it would work ;(. The original was
but I didn't like the double test against -1, so I tried to get rid of it. Don't know how I missed that it printed the extra one. A case of seeing what I wanted to see I guess. I'm not that surprised that doing the looping inside the regex engine is more efficient than at user level. I'm guessing that it makes a single pass looking for fixed anchors like the : when the /g options is used. I am surprised how much more efficient it is. Nice benchmark BTW. Something I need to get better at. Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring! In reply to Re: Re2: split question
by BrowserUk
|
|