Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Bones! Take a reading . . .

by merlyn (Sage)
on Jan 28, 2002 at 22:04 UTC ( [id://142132]=note: print w/replies, xml ) Need Help??


in reply to Bones! Take a reading . . .
in thread Trying to get index functionality in array context

This actually uses index, so it should run faster than regex based versions.
Not necessarily. If the text is a simple string, the regex engine can kick in BoyerMoore and other optimizations, and actually beat a naive index operation. Having said that, I believe that modern Perls actually hand index to the regex engine, just so that it can use BoyerMoore!

-- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://142132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2024-03-29 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found