Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Simply Too Slow Find and Replace

by I0 (Priest)
on Jun 03, 2002 at 01:15 UTC ( #171091=note: print w/ replies, xml ) Need Help??


in reply to Simply Too Slow Find and Replace

foreach $pair ( @pairs ){ ($key,$value) = split (/=/, $pair); chomp ($value); $s{lc $key} = $value; } foreach $name ( @names ){ $name =~s/(\s(\w+))/$s{lc $2}||$1/ieg; }


Comment on Re: Simply Too Slow Find and Replace
Download Code
Replies are listed 'Best First'.
Re: Re: Simply Too Slow Find and Replace
by samtregar (Abbot) on Jun 03, 2002 at 05:06 UTC
    Yow! That's probably going to be a heck of a lot slower than what's he's doing already. That will do a substitution on every pass, whether it contains a match or not!

    -sam

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (14)
As of 2015-07-29 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls