If you want to remove all duplicate letters, not just adjacent ones, this does it without any loops (external to the regex engine).
print $s; abacadaeafabacadaeafabacadaeafabacadaeafabacadaeafabacadaeaf $s =~ s[(.)(?=.*?\1)][]g; print $s; bcdeaf
In reply to Re: Remove repeated characters from a string
by BrowserUk
in thread Remove repeated characters from a string
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |