Hello,

        I have created a multi-referenced hash /array doing the following:

my $total;
my $machine;
my $serverdata;

start of loop ....

$serverdata->{$machine}->{day} = $total;
$serverdata->{$machine}->{hour} = $total / 24;

...end of loop

I have a loop that gets the data for each machine and stores it.

Now I want to print out the data but I would like to have it sorted by the value in day.

How would I go about doing this ?

I was doing something like:
foreach my $key (sort %hash{$a} <=> $hash{$b} (keys (%hash))) {
        blah blah blah
}

But I don't think I can use the same method because machine is all ways different ?

Thanks

Michael

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to