in reply to Re: Re: sorting hash of hashes
in thread sorting hash of hashes
Similar to that... make your code MUCH more readable :)for(sort sort_sub @foo) ... sub sort_sub { $a <=> $b; }
Perl moans about $log not being there because it isn't... $log isn't filled until after the sort is done... your $log data is in $a and $b.
So, let me get this straight... you want to sort at the first level of your hash, by a key in the 3rd level of your hash? The problem I see in this is... I assume you have many lines (i.e. $line data)? If that is true, then how do you find the category you need under many lines? Or is there just one line that has a 'time' category, and that is the one you need?
Can you give a small example of what your hash looks like?
- Ant
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
re: readibility
by larryk (Friar) on Apr 25, 2001 at 21:01 UTC | |
by suaveant (Parson) on Apr 25, 2001 at 21:05 UTC | |
by larryk (Friar) on Apr 26, 2001 at 15:38 UTC | |
by suaveant (Parson) on Apr 26, 2001 at 16:35 UTC | |
by larryk (Friar) on Apr 26, 2001 at 16:48 UTC | |
|