in reply to Problems with custom sort
$a and $b are assigned the actual array elements, not the index to them.
So I believe that this will do what you want:
So I believe that this will do what you want:
---- kurt@sorted = sort {$a->size() <=> $b->size()} @$setarray;
In Section
Seekers of Perl Wisdom