in reply to RE: Re: elementary hash
in thread elementary hash, STDIN questions

Actually that doesn't match the original code. If the entire text of the original was one of the matches, then it should be squashed. Here is a one-liner that works and is shorter, but only because of what the strings are:
perl -pi.bak -e 's/(blah|wah|yada)\1//g;s/^\s+$//' $file