in reply to Multiple replacements with the exception of previously made replacements.
my %replace = ("a" => "b", "b" => "a"); s/(a|b)/$replace{$1}/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Multiple replacements with the exception of previously made replacements.
by jthiel (Initiate) on Aug 17, 2009 at 14:54 UTC | |
by JavaFan (Canon) on Aug 17, 2009 at 15:41 UTC | |
by jthiel (Initiate) on Aug 17, 2009 at 15:53 UTC |