Perl : hachage
MethJy
-
MethJy -
MethJy -
arf j ai un petit probleme avec un hachage voila je n arrive pas a additionner les valeurs de deux hachages ... pourtant ce sont bien des scalaires alors ou est la couille ???!!!
%hash = (
1 => 3,
2 => 8
);
%hashb = (
1 => 5,
2 => 3
);
@chaine = keys(%hash);
foreach (@chaine)
{
$hash{$_}+ $hashb{$_}= $hashc{$_};
print"$hashc{$_}";
}
thx d avance
%hash = (
1 => 3,
2 => 8
);
%hashb = (
1 => 5,
2 => 3
);
@chaine = keys(%hash);
foreach (@chaine)
{
$hash{$_}+ $hashb{$_}= $hashc{$_};
print"$hashc{$_}";
}
thx d avance