Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Why study SCALAR?

by chipmunk (Parson)
on Dec 27, 2001 at 02:52 UTC ( #134501=note: print w/replies, xml ) Need Help??


in reply to Re: Why study SCALAR?
in thread Why study SCALAR?

study is meant to be used on the target string, not the regular expression!
study($line); $line =~ /$TEXT/;
Of course, study won't be a win if you're only going to perform a single match on the target string. And it turns out that it probably won't be a win even if you do a bunch of matches on the target string. The regular expression engine has had lots of optimizations added to it over time, making it pretty fast with or without the use of study.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2020-01-24 13:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?