Re: Complicated sort

2006-11-09 Thread Arnaldo Guzman
On Fri, 2006-11-10 at 00:59 -0500, Arnaldo Guzman wrote: > On Thu, 2006-11-09 at 08:47 -0500, Zielfelder, Robert wrote: > > Greetings: > > > > > > > > I have a sorting problem I need to solve but I'm not sure how to go > > about it. I have an application that dumps a file with a format like >

Re: Complicated sort

2006-11-09 Thread Arnaldo Guzman
On Thu, 2006-11-09 at 08:47 -0500, Zielfelder, Robert wrote: > Greetings: > > > > I have a sorting problem I need to solve but I'm not sure how to go > about it. I have an application that dumps a file with a format like > this: > > > > 19JAN2006.1503 > > 03JAN2006.1647 > > 19DEC2004.053

Re: Complicated sort

2006-11-09 Thread Rob Dixon
Zielfelder, Robert wrote: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have guessed, these are dates and times - timestamps

Re: Complicated sort

2006-11-09 Thread Jay Savage
On 11/9/06, Zielfelder, Robert <[EMAIL PROTECTED]> wrote: Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have gue

Re: Complicated sort

2006-11-09 Thread Mumia W.
On 11/09/2006 07:47 AM, Zielfelder, Robert wrote: Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may

Re: Complicated sort

2006-11-09 Thread lawrence
> Ok, so now Lawrence would you be so kind as to give a little explanation as > to what is going on here? > > I can see that it works but to be honnest after the line: "my @sorted = " I > am lost... > > Thanks in advance, > > Rob Coops > > Okay ... so, the basic algorithm is 1) turn a date

Re: Complicated sort

2006-11-09 Thread Rob Coops
Ok, so now Lawrence would you be so kind as to give a little explanation as to what is going on here? I can see that it works but to be honnest after the line: "my @sorted = " I am lost... Thanks in advance, Rob Coops On 11/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: #!/usr/bin/perl

Re: Complicated sort

2006-11-09 Thread lawrence
#!/usr/bin/perl use strict; use warnings; my %monthmap = ( JAN => '01', FEB => '02', MAR => '03', APR => '04', MAY => '05', JUN => '06', JUL => '07', AUG => '08', SEP => '09', OCT => '10', NOV => '11', DEC => '12' ); my %reversemap = reverse %monthmap; my @sor

Complicated sort

2006-11-09 Thread Zielfelder, Robert
Greetings: I have a sorting problem I need to solve but I'm not sure how to go about it. I have an application that dumps a file with a format like this: 19JAN2006.1503 03JAN2006.1647 19DEC2004.0530 24MAR2003.1115 As you may have guessed, these are dates and times - timestamps fo