in reply to hash problem

Are you looking for something like this:

@keys=qw(one two three); %hash = { $key[0]=>'1', $key[1]=>'2', $key[2]=>'3', }