in reply to group based array sort
Unless you're intent on reinventing the wheel, something like Sort::Tree looks like it does what you want.
Gary Blackburn
Trained Killer
|
---|
In Section
Seekers of Perl Wisdom