in reply to number of matches
counter = 0; @regex = qw( reg ex patterns ); for (@regex){ if (/\Q$_\E/){ $counter ++' } } print $counter; [download]