I think you miss the point of some the wackier answers. Perl is expressive,
which allows one to pursue a little creativity. I am not saying that most
of the "creative" answers are worth considering as solutions to the task at
hand, their worth lies in the creative play that brought them forth and in
any creativity they might inspire in others. I seriously doubt anyone is
pushing for XP in these cases (and often as not they are posted anonymously
anyway). Chaos and creativity are good things in moderation :-)
Besides, everyone knows that the best way to obtain the length of a string
is:
my $len = 0;
$string =~ s/(.)/q|'$len++;$1'|/gimmesomesex;