Quick search didn't find a dupe, but I'm sure there is one. Meanwhile:
To find elements of an array that meet a certain condition, you use grep. If you want the indexes instead of the elements.. well, Perl 6 added a grep-index method to handle that case, but in Perl 5 the easiest way is to change the target of grep. That is, instead of running it on the original array, run it on a list of indexes - just with a condition that references the original array. In your case, that might look like this:
my @array = ( 'Maria likes tomatoes',
'Sonia likes plums',
'Andrew likes oranges');
grep { $array[$_] =~ /plums/ } 0..$#array; # 1
Relevant bits:
$#array returns the index of the last element of @array.
- m
..n generates a range of values between m and n (inclusive); in list context that becomes a list of those values.
grep { code } list returns the elements of list for which code produces a true value when the special variable $_ is set to the element.
These sorts of expressions read most easily from right to left. So, first we generate a list of all the indexes of the original array (0..$#array), then we use grep to test each index (represented by $_) to see if the corresponding element of @array ($array[$_]) matches (~=) the regular expression /plums/.
If it does, that index is included in the list returned by the grep; if not, it's left out. So the end result is a list of only those indexes for which the condition is true. In this case, that list contains only the value 1.
Added to reply to your comment: It's important to note that the return value of grep is normally a list of matching elements, even if there is only one match. If you assign the result to an array (e.g. with my @indexes = grep...), the array will contain all the matching values. However, grep is context-sensitive, and if you call it in scalar context (e.g. by assigning its return value to a scalar variable with something like my $count = grep...), you'll instead only get a number telling you how many matches there were. You might want to take a look at this tutorial on context sensitivity in Perl.