in reply to Idiomatic Split to Scalar Conversion

You want to count the occurences of a character in a string, right? How about:

my $count = $string =~ tr/,//;

-sam