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.
In reply to Re: Replace a set of characters
by tirwhan
in thread Replace a set of characters
by Benson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |