# Save the indices of elements in @search that match $PAT $i++,/$PAT/ and push @indices, $i-1 for @search;