Give a 'config file' with 100 or so entries of global subs like: "/nli/|[nli]|<nli>","<p>" "/nlt/|[nlt]|<nlt>","<p1>" "/nlp/|[nlp]|<nlp>","<p3>" "/nlh/|[nlh]|<nlh>","<p2>" And so on...
I read these into a hash (sPiChars) with 'replace' value as key and the RegEx of the search terms as value of that give key. Then as I go over process each record in input, I check to see if one of these values present and then sub it if so, like: foreach $key(keys(%sPiChars)) { if($sTempRecord=~m/$sPiChars{$key}/) { $sTempRecord=~s/$sPiChars{$key}/$key/g; } } Which works, but it really kinda slows things down. Willing to admit that it's a small miracle I even got this to work, I'm guessing there is a better way to deal with many subs with RegEx; any clued as to which paths I should wander down in terms of increasing the efficiency of this? Thanks - kf [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]