in reply to Sorting a large data set
This also agrees with the general consensus that symbolic refs is a bad thing, aka should be avoided whenever possible.#!perl -w use strict; use Data::Dumper; my @list = ( { dist => 3, }, { dist => 1, }, { dist => 11, }, ); my @sorted = sort { $a->{dist} <=> $b->{dist} } @list; print Dumper( \@list ); print Dumper( \@sorted );
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: Sorting a large data set
by tilly (Archbishop) on Jan 06, 2002 at 00:00 UTC |