Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Technically I have got it working with 20 seperate
but there has got to be a better way....right?s/thing/newthing/g;
Any ideas how to make that one expression? Thanks!$string =~ s/foo/bar/g; $string =~ s/2003/2004/g; $string =~ s/cow/pig/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multi find/replace
by Enlil (Parson) on Feb 10, 2004 at 21:13 UTC | |
by jbware (Chaplain) on Feb 10, 2004 at 21:21 UTC | |
by mirod (Canon) on Feb 10, 2004 at 21:58 UTC | |
|
Re: multi find/replace
by Limbic~Region (Chancellor) on Feb 10, 2004 at 21:18 UTC | |
by bart (Canon) on Feb 10, 2004 at 21:52 UTC | |
by Limbic~Region (Chancellor) on Feb 10, 2004 at 22:28 UTC |