Most of your tests use a 30,000 character string but your "split_by" test uses a 30,002 character string so the tests are not exactly equivalent.
Just saying ... :)
Naked blocks are fun!
-- Randal L. Schwartz, Perl hacker
| [reply] |
I agree, this one test uses +2 more characters, but it is like included in the test as a tool.
But now I think the first 'x' which is prepended is simply redundant, because if the string starts with "ab", it anyways gives an empty string as a leftmost result. The appended 'x' is not redundant, because if the string ends with pattern "ab", then it doesn't produce an empty string as a rightmost result. But here comes 'split' with three parameters with third being '-1', and then there is no need to append something like 'x'.
| [reply] [d/l] |