in reply to sub routine to sort per time
but it does not workThat's not an error description.
One of the obvious problems is that here:
if ($h_a < $h_b){ -1; } if ($h_a > $h_b){ 1; }
There should really be return statements. But all of this could be written rather compactly as $h_a <=> $h_b || $m_a <=> $m_b - but as I said before, for simple formats there's no need for that at all.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sub routine to sort per time
by steph_bow (Pilgrim) on Nov 26, 2008 at 10:49 UTC | |
by moritz (Cardinal) on Nov 26, 2008 at 10:53 UTC | |
by BrowserUk (Patriarch) on Nov 26, 2008 at 11:05 UTC | |
by moritz (Cardinal) on Nov 26, 2008 at 11:02 UTC |