It sounds like you have an array of hashrefs (or possible arrayrefs). In the first case (array of hashrefs) you would sort as follows (@array is your array):
Code:
my @sorted_array = sort {$a->{key} <=> $b->{key}} @array;
where you need to replace 'key' by the hash key you are sorting on. Interchange $a and $b if you want to sort descending, interchange '<=>' with 'cmp' if you are sorting alphabetically.
For an array of arrayrefs you would do:
Code:
my @sorted_array = sort {$a->[1] <=> $b->[1]} @array;
where you need to replace 1 with the number of the field in the arrayref you want to sort on.
Ivan
-----
Iyengar Yoga Resources /
GT Plugins