use Data::Dumper; my $customers = [ map { { current => [ $_ ] } } (13, 110, 10, 102, 108, 130, 10, 107, 5, 210, 1, 160, 16) ]; print Dumper $customers; #### print $customer->[8]->{current}->[0]; #### my @sorted = sort { $a->{current}->[0] <=> $b->{current}->[0] } @$customer; print Dumper \@sorted;
## print $customer->[8]->{current}->[0]; ##
## my @sorted = sort { $a->{current}->[0] <=> $b->{current}->[0] } @$customer; print Dumper \@sorted;