Re: tough sort question

2001-04-25 Thread Michael Lamertz
I'm not even sure if I understand your problem. Looks as if you already solved most of it. [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > Given the following text file: > > My first idea is to rebuild the array with a 'sortkey' pre-pended to each > record, and then sorting this temp-array by th

Re: tough sort question

2001-04-25 Thread Timothy Kimball
: I need to sort all records by: 1) dept, name, record type. : ... : The real problem I have is with the "name" field being in one record only. : The 'xx' values show that the name cannot be simply copied to the remaining : records. Try a two-pass solution: first create a hash that maps IDs to n

RE: tough sort question

2001-04-25 Thread Wagner-David
Here is a shot at perl source and others should follow: Wags ;) = #!perl -ws =head1 id --- dp -- name T - Unrelated