John Fitzgerald wrote: > > Hi, I'm fairly new to Perl, and trying to do a simple > operation on a text file exported from excel. > ID Enrolled Extraneous Columns.... > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 05-Aug-03 > 3008 24-Sep-03 > 3009 11-Aug-03 > 3010 19-Nov-03 > 3010 11-Jul-03 > 3010 11-Jul-03 > 3010 11-Jul-03 > 3011 15-Jul-03 > > As you can see, the dates for a given ID are > different. What I need to do, is set the dates all to > the earliest date for that ID (client-birth date). The > other columns are are important, but don't factor in > here.
Hi John. First, you need to decide what the output is to be. Do you just want a list like: 3008 01-Jan-1970 3009 01-Jan-1970 3010 01-Jan-1970 3011 01-Jan-1970 with each date set to the earliest found? Or do you also need the 'Extraneous Columns'? Second: do you have a copy of Date::Calc installed? perldoc Date::Calc will tell you if you don't know. Then you need to know how to use hashes. But let us know the other stuff first :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>