in reply to How to count substitutions on an array
Two remarks:
Use List::Util qw( sum ); $count = sum map s/$foo/$bar/g, @array; [download]