in reply to Simply Too Slow Find and Replace
...I'm thinking that there might be a little increase in speed here:
($key,$value) = split (/=/, $pair); chomp ($value);
Instead of a call to split() and another to chomp(), it might work just to use a regular expression to get the terms.
($key,$value) = ($pair =~ /^([^=]+)=(.*)$/);
I don't know if it helps in a significant way, but it's something I would have instinctively tried. (Of course, if you spend half a day bulletproofing the regular expression, it probably wouldn't have been worth it.)
---v
|
|---|