in reply to Using an element in a Hash of Arrays to access the key

Not answering your query, but you can save some typing when initialising your arrays by using qw (see Quote Like Operators).

my @array1 = qw{ one two three four five }; my @array2 = qw{ banana pear apple };

I hope this is helpful.

Cheers,

JohnGG