the reason for avoiding the array of array solutions is that an array of arrays doesn't say anything about the data, and in fact implies some kind of grid structure, which isn't what you have.my @config = [ { number => 0, name => corkscrews }, { number => 0, name => openers } ]; sub sort_products { sort { $a->{number} <=> $b->{number} or $a->{name} cmp $b->{name} } @_; }
In reply to Re: 2 dimensional array sorting...
by Anonymous Monk
in thread 2 dimensional array sorting...
by Soko
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |