#!user/bin/perl
use strict;
##二维数组排序
my @list=( ["1","3a","hh"], ["2","4","gg"], ["2g","4","ff"], ["2g1","4","ff"], ["12","2","aa"], ["12g","2","bb"], ["12g1","2","cc"], ["12g2","2","dd"], ["12g11","2","ee"], ["121","2as","ee"], ["122","as2as","asee"], ); my @array = sort{$a->[1] <=> $b->[1]} @list; foreach (0..$#array){
print join " ", @{$array[$_]},"\n"; }
|