while (my($k,$v) = each %hash) { print "$map{$k}-$map{$v->[0]} $v->[1]\n"; }