good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Is Group Substitution Possible?by ketema (Scribe) |
on Jul 28, 2005 at 19:49 UTC ( [id://479110]=perlquestion: print w/replies, xml ) | Need Help?? |
ketema has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks...I am always looking for one liners and I would like to know if it is possible to substitute a group of known substrings with a set of corresponding known values. For example: Now I could easily substitute out... And the value of $string is: "TestCOLON FileNames can't have FSLASH BSLASH and other special characters" But I would like to know if its possible to do all the substitutions in one line with some sort of grouping. Thanks
Back to
Seekers of Perl Wisdom
|
|