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


in reply to Re: A silly reg exp question
in thread A silly reg exp question

s/8/7-/g; s/7/33-/g; s/6/5-/g; s/5/22-/g; s/4/3-/g; s/3/11-/g; s/2/1-/ +g; s/1/-/g;

This version certainly seems to work, but is it lazy, crazy, peevish, peccant, or...?

I think it's the version I would choose if I hated the person who would be maintaining my code!

Update: ++ for the whole reply for diversity and perversity!