Thread hash mit value array und im array hash (5 answers)
Opened by meto at 2012-04-10 09:02

bloonix
 2012-04-10 09:43
#157348 #157348
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
hash_1 nochmal im Array abzulegen macht eigentlich keinen Sinn, denn der Hashkey hat ja schon die Info...

So ists schicker:

Code: (dl )
1
2
3
4
5
6
7
8
%hash = (
hash1 => [sort keys %hashInArry1],
hash2 => [sort keys %hashInArry2],
);

foreach my $key (keys %hash) {
print "$key: ", join(", ", @{$hash{$key}}), "\n";
}
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread hash mit value array und im array hash