For single character replacement, tr/// is the ticket. It comes without the overhead of the regex engine.
One way to answer questions like this is use Benchmark;
After Compline,
Zaxo
In reply to Re: tr/// vs s/// for single character
by Zaxo
in thread tr/// vs s/// for single character
by Flame
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |