in reply to array to hash
my %hash; for $var (@array) { while (<STDIN>) { chomp; $hash{$_} = $var; } } [download]