$str =~ s/(.)\1+//g;
Update: Redid after seeing mr_ron's post. (was originally s/((.)\2+)//g;)
In reply to Re: How to remove all repeating characters in a string in place
by Cristoforo
in thread How to remove all repeating characters in a string in place
by punitpawar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |