Thread Arrays und Hashs (15 answers)
Opened by jan10001 at 2004-07-26 10:48

kabel
 2004-07-26 10:53
#84925 #84925
User since
2003-08-04
704 Artikel
BenutzerIn
[default_avatar]
Quote
kabel@kabelskiste:~$ perl
%hash1 = (1 .. 8 );
%hash2 = (4 .. 11);

@hash2{keys %hash1} = values %hash1;

foreach (keys %hash2) {
print $_, $hash2{$_}, $/;
}

89
67
12
45
34
78
1011
56
kabel@kabelskiste:~$

hierbei ueberdeckt %hash1 schluessel aus %hash2

zu arrays: willste doppelte eintraege behalten oder net?
-- stefan

View full thread Arrays und Hashs