in reply to 2 dimensional array sorting...
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} } @_; }
|
|---|