my @sorted = sort { $a->{current}->[0] <=> $b->{current}->[0] } @$customer; print Dumper \@sorted;