in reply to Counting number of characters in a string
Yet Another (stupid) Way To Do It:
$string = "foobar"; $count = $string =~ s/(.)/$1/sg; [download]