in reply to Re: Removing Adjacent Character Repititions
in thread Removing Adjacent Character Repititions
If you want to remove contiguous duplicates of literally every character, you don't have to specify any characters with tr///s, you just add the /c option.
$s = 'Ttthe Qqquiicccck brroooown fox' $s =~ tr///cs print $s Tthe Qquick brown fox
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
|---|