2
我有我创建这样的二维数组:如何在perl中自定义排序二维数组?
# i do this in a loop
push @{ $list[$array_index++] }, ($x[0], $x[1], $x[2], $y);
我试着写的排序功能,此数组是这样的:
@sorted = sort {$a->[3] > $b->[3]} @list;
,但它似乎并没有工作。
我想要做的是根据每个“行”的“第三列”的值排序“行”。我该怎么做?
是,非常感谢你:) – Consuelo 2013-05-09 20:11:14