Because s/// has to be able to handle all RE syntax and specialness while tr/// just considers its input to (mostly) be a simple character class. Much easier to deal with and, thus, much faster.
bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.
In reply to (bbfu) (tr/// vs s///) Re(2): How to remove double quotes?
by bbfu
in thread How to remove double quotes?
by basicdez
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |