in reply to Counting Substrings in Strings

Please use a list context switcher. :)
$text = 'asdasd'; $count = () = $text =~ /asd/g;