http://www.perlmonks.org?node_id=3224

# to squish a string y sssscccc; y cccscsss; y yyysc; # to get the string length y yyyc; # to clear a string y ccccdddd; y dddcdccc; y yyycd;
Only beautiful when used on $_ of course.