in reply to Sorting a large data set

If I understand your datastructure correctly the snippet
below fits MY brainstructure better.

#!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 );
This also agrees with the general consensus that symbolic refs is a bad thing, aka should be avoided whenever possible.

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
    While the syntax you are using is clearer, the resulting meaning is identical. Your note about symbolic references is a red herring.