On Mon, Feb 18, 2002 at 11:03:33AM -0500, Yacketta, wrote:
> Folks,
> 
> I have an array which contains data as such
> 
> psych|Sun Feb 17  2002|0:35:59|1523882|HLHack|UG-CS Central-Hell's Kitchen
> uenlon|Sun Feb 17  2002|3:31:17|127244|HLHack|UG-CS Central-Hell's Kitchen
> uenlon|Sun Feb 17  2002|3:31:19|127244|HLHack|UG-CS Central-Hell's Kitchen
> juihung|Sun Feb 17  2002|7:4:56|1149357|HLHack|UG-CS Central-Hell's Kitchen
> juihung|Sun Feb 17  2002|7:4:57|1149357|HLHack|UG-CS Central-Hell's Kitchen
> S02|Sun Feb 17  2002|7:13:18|831398|HLHack|UG-CS Central-Hell's Kitchen
> S02|Sun Feb 17  2002|7:13:20|831398|HLHack|UG-CS Central-Hell's Kitchen
> 
> and would like to sort it by the second and third field (the date IE "Sun
> Feb 17  2002 7:13:20")
> I have tried several different methods including the use of Date::Manip
> etc..
> no matter what I do the date is not sorted in descending order
> (http://www.sampier.com/busted.php)
---end quoted text---

how-about splitting the fields and converting to an epoch time? 
you'll need Time::Local

$epochtime=timelocal($sec,$min,$hours,$mday,$mon,$year);

for the rest use split or a nice regex ;)
-- 
 Frank Booth - Consultant
Parasol Solutions Limited.
(www.parasolsolutions.com)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to