in reply to Sort Question (Again) :(
my @sorted_list = map { $_->[0] } sort { $a->[1] cmp $b->[1] or $a->[2] cmp $b->[2] } map { [ $_, (split /\t/)[3,4] ] } @database_in;
I made a few stylistic changes too :)
Update: Removed $_ from split. Hofmator is right - it was an artifact from the refactoring :(
--"The first rule of Perl club is you don't talk about Perl club."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sort Question (Again) :(
by Hofmator (Curate) on Oct 19, 2001 at 20:28 UTC | |
|
Re: Re: Sort Question (Again) :(
by LostS (Friar) on Oct 19, 2001 at 20:34 UTC | |
by pixel (Scribe) on Oct 22, 2001 at 12:31 UTC | |
by runrig (Abbot) on Oct 19, 2001 at 20:53 UTC | |
|
Re: Re: Sort Question (Again) :(
by LostS (Friar) on Oct 19, 2001 at 20:28 UTC | |
by dragonchild (Archbishop) on Oct 19, 2001 at 20:30 UTC | |
by LostS (Friar) on Oct 19, 2001 at 20:36 UTC |