It looks like what you are trying to do in the end is select the elements from @array that are also in @subset, by preserving the original order. The element that let's you check that something "is in" in perl is a hash. A hash does not preserve order so that's another clue that you should use it on the data where order is not important. You can build quickly a hash from an array like this:
my %in_subset = map { $_ => 1 } @subset; # Set the value 1 for each ke
+y in @subset
Then filtering @array is very simple:
my @filtered = grep { exists $in_subset{$_} } @array; # grep for only
+the elements of @array which are in subset
my @same = grep { $in_subset{$_} } @array; # Technically also works be
+cause trying to access a non existing key will return undef, which is
+ false
#Edited (missing } on the second line) thanks to AnomalousMonk
FYI, if what you actually needed was the indexes of the elements of @array that are in subset, you can again use a hash:
my %index_map = map { $array[$_] => $_ } 0..$#array; # Associate each
+ element with its index (only works for unique values though)
my @matching_indexes = map { $index_map{$_} } @subset; # Get the index
+ for each value in @subset
And last note, actually your code isn't bad, or inelegant at all, mostly because it is correctly indented, and there is some thought put into variable names. But rather than just rely on _ref suffixes for references, I strongly encourage you to add use strict; and use warnings; at the top of your program, to let perl warn you about the more subtle errors.