in reply to Sort Problem
my @records = sort { $a->[0] <=> $b->[0] || $a->[1] cmp $b->[1] || $a->[2] cmp $b->[2] || $a->[3] <=> $b->[3] } map { [ split '#', $_ ] } map { chomp; $_ } @DB;
You have to read that code from bottom to top.
When it's all done, @records will be an array containing array references. If you need more explanation, please ask.
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sort Problem
by Anonymous Monk on Mar 30, 2004 at 16:29 UTC | |
by dragonchild (Archbishop) on Mar 30, 2004 at 16:36 UTC | |
by Anonymous Monk on Mar 30, 2004 at 17:00 UTC | |
by dragonchild (Archbishop) on Mar 30, 2004 at 17:05 UTC |