in reply to Sort Question (Again) :(
Update:With extra added condition of stripping leading spaces. Fixed. Can't have 'local $_' inside do{} block due to split using outer $_.my @sorted_list = map { $$_[0] } sort { $$a[1] cmp $$b[1] } map { [ $_, do{ my $tmp = join "\x00", (split /\t/)[3,4]; $tmp =~ s/(^|\x00)\s+/$1/g;$tmp } ] } @database_in;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sort Question (Again) :(
by LostS (Friar) on Oct 19, 2001 at 20:56 UTC |