@$hashref{@keys}=@values
With
$hashref=$nodemetrics{$node}
Not sure why you prepopulate to 0, simply undef seems more robust and is easily done:
@$hashref{@keys}=()
HTH :)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
In reply to Re: Not sure how to populate a hash
by LanX
in thread Not sure how to populate a hash
by aditya1977
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |