in reply to Replace a set of characters

Homework again? You can do both of these with the s/// operator, take a look at the examples in perldoc perlop, especially the "e" option.


Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan