in reply to Schwartzian Transform and memory allocation.
More clarification here.. I do actually use a variable as an indice, as thelenm pointed out. The column to be sorted on is passed via query string and is plugged into the sort. Ex:
@file_data = map { $_->[0] } sort { $a->[$variable] cmp $b->[$variable] } map { [ $_, (split(/\|/)) ] } @file_data;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Schwartzian Transform and memory allocation.
by Abigail-II (Bishop) on Jun 19, 2002 at 16:40 UTC | |
by ThingFish (Beadle) on Jun 21, 2002 at 16:37 UTC | |
Re^2: Schwartzian Transform and memory allocation.
by Aristotle (Chancellor) on Jun 19, 2002 at 19:21 UTC | |
by flounder99 (Friar) on Jun 20, 2002 at 13:41 UTC | |
by Aristotle (Chancellor) on Jun 20, 2002 at 22:53 UTC |
In Section
Seekers of Perl Wisdom