something like this
{if ($array[x] =~ /$substring/) {$count++;}}counts the number of strings in the array that have the substring
and something like this
my $count2=0; while ($array[1] =~ /$substring/g) {$count2++;}
counts the number of substrings in a single string
but how can i combine them?
In reply to How to count substrings in an array? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |