in reply to Simply Too Slow Find and Replace

I'm thinking there's a problem with
foreach $pair (@pairs) { ($key,$value) = split (/=/, $pair); chomp ($value); foreach $name (@names) { $name =~s /\s$key/$value/ig; @newrecords = (@newrecords,"$name"); } }
Assuming M pairs and N names, won't this end up with NxM newrecords? I suspect that you either want to verify that the subsitution fired before appending to @newrecords, or, if multiple substitutions per record are possible, defer the appending to @newrecord until all @names are processed. In either case, you'll end up with M newrecords instead of NxM.