On Fri, Jul 24, 2009 at 4:54 AM, Shawn H. Corey<shawnhco...@gmail.com> 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: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to