Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2020-09-29 14:35 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (146 votes). Check out past polls.