RE: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 17:47:09 GMT, Timothy Johnson wrote: > IMHO = In My Humble Opinion > > RTFM = Read The Freaking Manual > > TMAMYEHTU = Too Many Acronyms Make Your Emails Hard To Understand Strange, I didn't find that last one at -- felix --

RE: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Timothy Johnson
: Sort table with dynamic order of fields [Part 1] > Using parallel arrays to store related data is not a good idea imho. I wanna ask for long... so what is IMHO and RTFM ?? > I would use an (anonymous) array of hashes here: > > my $persons = [ { ID => 'Foo', COUN

Re: Sort table with dynamic order of fields [Part 1]

2002-07-31 Thread Connie Chan
> Using parallel arrays to store related data is not a good idea imho. I wanna ask for long... so what is IMHO and RTFM ?? > I would use an (anonymous) array of hashes here: > > my $persons = [ { ID => 'Foo', COUNTRY => 'UK', GENDER => 'F' }, > { ID => 'Bar', COUNTRY =>

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: Felix Geerinckx <[EMAIL PROTECTED]> > Using your datastructure, this would indeed be rather complicated. If > you could use the datastructure I proposed at the beginning of this > post, you could write I don't think it's wise to overwrite a function definition over an over again. Create an

Re: Sort table with dynamic order of fields

2002-07-31 Thread Felix Geerinckx
on Wed, 31 Jul 2002 12:56:17 GMT, [EMAIL PROTECTED] (Connie Chan) wrote: > What I have now is something like this : > @ID = qw (Foo Bar Blaz Bob); > @Country = qw (UK US HK HK); > @Gender = qw (F M M F); Using parallel arrays to store related data is not a good idea imho. I would use an (anonym

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: "Connie Chan" <[EMAIL PROTECTED]> > > Are you sure it's a HashOfArrays and not an ArrayOfHashes? > > > > #HAO > > > > $data{$key} = ['Jenda', 'Krynicky', '[EMAIL PROTECTED]', ...] > > > > # AOH > > $data[$i] = {fname => 'Jenda', lname => 'Krynicky', email => > > '[EMAIL PROTECTED]', ...}

Re: Sort table with dynamic order of fields

2002-07-31 Thread Connie Chan
> Are you sure it's a HashOfArrays and not an ArrayOfHashes? > > #HAO > > $data{$key} = ['Jenda', 'Krynicky', '[EMAIL PROTECTED]', ...] > > # AOH > $data[$i] = {fname => 'Jenda', lname => 'Krynicky', email => > '[EMAIL PROTECTED]', ...} > What I have now is something like this : @ID = qw (Foo

Re: Sort table with dynamic order of fields

2002-07-31 Thread Jenda Krynicky
From: "Connie Chan" <[EMAIL PROTECTED]> > Thanks in advise =) > > In case, my source is not an Excel spread sheet, but a Hash Of Array. > So is that mean if I want to use this function, then I have to convert > my HOA to Spreadsheet, then use the method below to sorting about ? Or > anything I c

RE: Sort table with dynamic order of fields

2002-07-31 Thread Timothy Johnson
-Original Message- From: Connie Chan To: Timothy Johnson; [EMAIL PROTECTED] Sent: 7/30/02 11:43 PM Subject: Re: Sort table with dynamic order of fields Thanks in advise =) In case, my source is not an Excel spread sheet, but a Hash Of Array. So is that mean if I want to use this function, t

Re: Sort table with dynamic order of fields

2002-07-31 Thread Connie Chan
Thanks in advise =) In case, my source is not an Excel spread sheet, but a Hash Of Array. So is that mean if I want to use this function, then I have to convert my HOA to Spreadsheet, then use the method below to sorting about ? Or anything I can do more direct ? Or anything can let me directly

RE: Sort table with dynamic order of fields

2002-07-30 Thread Timothy Johnson
e '.'s to '->'s, etc. -Original Message- From: Connie Chan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 30, 2002 12:25 AM To: [EMAIL PROTECTED] Subject: Sort table with dynamic order of fields In Excel, there is an interesting function which can sort a table b

Sort table with dynamic order of fields

2002-07-30 Thread Connie Chan
In Excel, there is an interesting function which can sort a table by fields with any order and hierarchy order. Is there any module can do this for whatever array of array, hash of array... etc. ? But what I am looking for is not for and related to any database. So some of DBI functions maybe n