Hi There!
I want to search for an element in an array. What I want to get from this search is the all the indices of the array where I find a match.
So, for example the word I want to search is :
$myWord = cat
@allMyWords = my whole file with multiple occurrances of cat in random positions in file
So, if cat occurs at 3rd, 19th and 110th position, I want those indices as a result of it. I was wondering if there is a small and simple method to do this.
Thanks!