On Fri, Jul 24, 2009 at 4:54 AM, Shawn H. Corey<[email protected]> wrote:
[snip]
> Unfortunately, the data is not directly sortable since the date is in
> American format, not Système International (SI). SI dates are directly
> sortable and are the preferred format for storing dates.
>
> I would use a heap to sort:
>
Parts of the date, however, are sortable. Use that to your advantage.
for my $item (sort { $a->[3] <=> $b->[3] || $a->[1] <=> $b->[1] ||
$a->[2] <=> $b->[2] || $a->[4] cmp $b->[4] } map { split /@|-/ }
<DATA>) {
#do something
}
HTH,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/