in reply to array to hash

If I understood you right than try:
my %hash; for $var (@array) { while (<STDIN>) { chomp; $hash{$_} = $var; } }


Hotshot