in reply to Re^2: Request help on optimizing a loop for looking up numbers
in thread Request help on optimizing a loop for looking up numbers

Hash slices might be what you need. This is an example of how they work demonstrated under the Perl debugger:
DB<1> @hash{qw/one two three/} = qw /1 2 3/; DB<2> x \%hash 0 HASH(0x302ee308) 'one' => 1 'three' => 3 'two' => 2 DB<3>