http://www.perlmonks.org?node_id=152771

hotshot has asked for the wisdom of the Perl Monks concerning the following question:

A busy day ! (at least for me)

I have an array of strings and a file that is of the format:
str1 value1 str2 value2 ...
both the array and the strings in the file are not necessarly sorted.
I need a quick way to run on this file and get the values for the strings in the array (we shell assume they all exist), I thought about reading the file to an array, sort it and run on it again (I sorted the array too).
Anyone has a better way?

Thanks.

Hotshot