I have a large hash and have a subset of keys that I want to extract the values for, without having to iterate over the hash looking for each key (as I think that will take too long).
I was wondering if I can use grep
to grab a file with a subset of keys? For example, something along the lines of:
my @value = grep { defined $hash{$_}{subsetofkeysfile} } ...;