in reply to Trouble sorting a nested HOH

If I understand corectly, you have effectively got a rec for each IP/Sock, with various bits of info attached to each one.
In a similar situation, I converted total hash to an array of anonymous hashrefs (1 arr element for each 'rec'), then you can easily sort on any (sub)field eg:

for $sort_rec ( sort { $a->{'day_num'} <=> $b->{'day_num'} || $a->{'sti'} <=> $b->{'sti'} || $a->{'bnum'} cmp $b->{'bnum'} || $a->{'pos'} <=> $b->{'pos'} } @offset_recs
HTH
Cheers
Chris

Replies are listed 'Best First'.
Re^2: Trouble sorting a nested HOH
by mielstogo (Initiate) on Nov 28, 2007 at 21:12 UTC
    Exactly the "pointer" I needed! Thanks for the input! An array of anonymous hashrefs will work perfectly with my row oriented presentation.

    This will also lend itself to my -graph option which uses GD::Graph to plot the data, once in the array of anon hash refs I can easily clip the outlier averages to make a decent bar graph (and show the outliers on their own graph if need be).

    Thanks!