- or download this
my $sorter=sub { $_[0] <=> $_[1] };
- or download this
my @sorted=sort { $sorter->($a,$b) } @unsorted;
- or download this
my $sorter=sub { $_[0]->{$_[1]} <=> $_[0]->{$_[2]} };
- or download this
my @sorted=sort { $sorter->($hashref,$a,$b) } @unsorted;