in reply to SUBSTR OR REGEX: WHICH WILL YOU FAVOUR?

Is the benchmark module broke or something? lol!!

Yes. lol!!

print $1 while 'abcdefghijkl' =~ m[(.{3})]g;; abc def ghi jkl use constant LEN => 3;; print $1 while 'abcdefghijkl' =~ m[(.{LEN})]g;; ## notable absence of output mean the regex matched nothing (very, ver +y quickly).

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: SUBSTR OR REGEX: WHICH WILL YOU FAVOUR?
by Anonymous Monk on Oct 19, 2013 at 20:33 UTC

    Nice catch BrowserUk! You know I didn't even border to test the changed made on the regex to see the output.
    I think this is why is good to be paranoid some of the time, especially, when your pre-informed mind is called to question by new discovery! lol!!
    So, substr still carry the day!!!