http://qs321.pair.com?node_id=1154095


in reply to How to remove all repeating characters in a string in place

Hi,
...or any other way to do this ?

What about using tr/// you can do perldoc -f tr on your CLI to read the documentation.
The following works like you wanted:

perl -we "$ARGV[0]=~tr[abf]()ds; print $ARGV[0]" aaabbcdeffgh # prin +ts cdegh

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me