in reply to Re: multi find/replace
in thread multi find/replace
Good:
%replace = ( A => 'B', B => 'C', C => 'A'); s/(A|B|C)/$replace{$1}/g;
Bad:
For the latter, everything that was "A", "B" or "C", will now be "A".s/A/B/; s/B/C/; s/C/A/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: multi find/replace
by Limbic~Region (Chancellor) on Feb 10, 2004 at 22:28 UTC |