You cannot order hash keys, by definition, their order is arbitrary.
What I understand by first pass means that for one key $host from %nodes, $rrd takes on the values from %rrd in thje way you expect, but it does not for the other keys in %nodes. I doubt that is what you mean ... or if it is, you are not showing the relevant coded, since %rrd is not modified in the code you present.
How about putting a print statement in the inner loop, to see what is happening?
for my $host(keys %nodes) { for my $rrd(keys %rrd) { printf "host: %s\trrd: %s\n", $host, $rrd; # my $avg = &get_latest_avg($host,$rrd,'free'); # print $avg. "\n"; } }
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: Return from a subroutine generates a negative value
by TomDLux
in thread Return from a subroutine generates a negative value
by c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |