in reply to count number of occurrences of specific character(s) in a string
$n = () = '((1,2)(b,c)' =~ /[()]/g; print $n; [download]