in reply to Re: Need to sort and data structure based on values inside arrayrefs.
in thread Need to sort and data structure based on values inside arrayrefs.

Thank you all for the reply. This is how i achieved the result.

1). Created another hash with 5th entry as value.
2). Sorted the that hash, moved keys to an array

my @sorted = sort { $subHash{$b} <=> $subHash{$a} } keys %subHash;
, @sorted had the required output.
Thanks agin for the pointers, closing the thread

Thanks
  • Comment on Re^2: Need to sort and data structure based on values inside arrayrefs.
  • Download Code