in reply to Removing characters

Identifying words with valid double characters makes this trickier. I'd start with something like:
while (<INFILE>) { s/([A-Za-z])\1/$1/g; }
That's not an ideal solution, but it's a brute-force 80 percenter.