in reply to Re^2: Multiple replacements with the exception of previously made replacements.
in thread Multiple replacements with the exception of previously made replacements.
Otherwise, you'll have to update the pattern in the s/// if you add a new hash element.my %replace = (....); my $pat = join '|', map {quotemeta} keys %replace; s/($pat)/$replace{$1}/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Multiple replacements with the exception of previously made replacements.
by jthiel (Initiate) on Aug 17, 2009 at 15:53 UTC |