Perl Regex - Condensing groups of find/replace
- by brydgesk
I'm using Perl to perform some file cleansing, and am running into some performance issues. One of the major parts of my code involves standardizing name fields. I have several sections that look like this:
sub substitute_titles
{
my ($inStr) = @_;
${$inStr} =~ s/ PHD./ PHD /;
${$inStr} =~ s/ P H D / PHD /;
${$inStr} =~ s/ PROF./…