Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: the god awful =~

by nashdj (Friar)
on Dec 04, 2000 at 11:41 UTC ( #44756=note: print w/ replies, xml ) Need Help??


in reply to Re: the god awful =~
in thread the god awful =~

Maybe ok wasnt 100% clear, but if you look at his script it is kind of the reverse. He wants to print out some text for each name that matches against $request.

None the less, you have raised an interesting point, is repeating a regex better than a long disjunctive regex? In one script I have, I need to test around 300 words against a single sentence and strip them out (its just a psudo-ai type thing that needs to ignore a lot of psudo-useless words).

The way its currently being done is simply:

$foo =~ s/$_//i for (@list);

Are there any faster/better ways than that?


Comment on Re: Re: the god awful =~
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2016-02-05 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (208 votes), past polls