in reply to Deleting intermediate whitespaces, but leaving one behind each word
Squeezing or squashing repeated characters is what it's called. There's the tr unix utility, and perl has a tr operator, too.
$ perl -wpe 'tr/ //s;'