![]() |
|
Welcome to the Monastery | |
PerlMonks |
Re:^3 Remove repeated characters from a stringby knew (Monk) |
on May 13, 2004 at 15:12 UTC ( #353097=note: print w/replies, xml ) | Need Help?? |
This will do that for you: 1 while $string =~ s/(.)(.*)\1/$1$2/g
In Section
Seekers of Perl Wisdom
|
|