in reply to Re^3: how to count the no of repeats in a string
in thread how to count the no of repeats in a string

A step forward (for some definition of forward) could've been

local our %counts; $string =~ /(?:^|,)([^,]*)(?:,|\z)(?{ $counts{$1}++ })(?!)/;
if one really wants to do it the regex way. ;-)

lodin