I'm making a minimal case here, how should I dump the values of arrays inside array?
Multiple arrays, which contains a string value and a number, now I sort the array by second value, and read the value of the first field in order.
my @a = { "A" , 123 };
my @b = { "B" , 9 };
my @entries = ();
push @entries , \@a;
push @entries , \@b;
@entries = sort { $a[1] cmp $b[1] } @entries;
for (@entries)
{
print @_[0] , "\n"; // should be "A\nB" after for loop
}
And what document should I view? Hmm... it's not like normal array in array, e.g syntax like $a[0][0].