- or download this
@data = (
[qw(Bubba brutalski 20)],
...
$a->[0] cmp $b->[0]
||
$a->[2] <=> $b->[2]} @data;
- or download this
# Full sort by Name, surname, then score
@data = sort { $a->[0] cmp $b->[0] } @data;
@data = sort { $a->[1] cmp $b->[1] } @data;
@data = sort { $a->[2] <=> $b->[2] } @data;
- or download this
return -1; # moves the item lower
return +1; # goes above the previous one
return 0; # equals