just golfing yours:
perl -nle'print$1?("$1 repeated ",length($&)/length$1," times"):$&whil +e/(\w+?)\1+|./g'
You don't need the brackets around the time(s), because any time it's less than two, you only print out one character. You were matching \w, so I didn't check for defined on $1, just $1, but it should give the same results.

I think that's 75, not including switches.

Jasper

In reply to Re: (golf) Collapse repetitions within a string by Jasper
in thread (golf) Collapse repetitions within a string by Corion

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":