Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

RE: Re: matching an array of alternates

by Zoogie (Curate)
on Jun 23, 2000 at 23:54 UTC ( [id://19652]=note: print w/replies, xml ) Need Help??


in reply to Re: matching an array of alternates
in thread matching an array of alternates

Just wanted to point out that if the file you're searching has a lot of lines, you can gain some speed by adding the "o" option to the regex; i.e.:
print $1 if /$regex/o;
This way, the regular expression only has to be compiled once.

- Zoogie

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-25 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found