這裏的陣列的列表是腳本如何排序陣列
use strict;
sub sortF {
my $l1 = hex ${@$a}[0];
my $l2 = hex ${@$b}[0];
return $l1 <=> $l2;
}
my @results;
my @parsedLine = ['0x1a',"hello"];
push(@results, @parsedLine);
my @parsedLine2 = ['0x1b',"ohello"];
push(@results, @parsedLine2);
my @sortedresults = sort(sortF(@results));
我想通過匿名數組的第一個元素列表@Results排序列表中的元素指着
這給出錯誤
Can't use string ("0") as an ARRAY ref while "strict refs" in use at ...
sortF函數應該如何寫入?