Sorting array of hashes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sherihan2007
    New Member
    • Jul 2007
    • 3

    Sorting array of hashes

    Hi everyone...

    can anyone tell me how can we sort an array of hashes? Please reply soon. Its urgent...

    Thanks in advance
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    use the sort() function and the appropriate operator depending if you are sorting strings (cmp) or digits (<=>) or mixed data. What have you tried so far?

    Please understand, it may be urgent to you but it is not to any of us, all questions are given the same priority: none.

    Regards,
    Kevin

    Comment

    • miller
      Recognized Expert Top Contributor
      • Oct 2006
      • 1086

      #3
      A similar goal is demonstrated near the bottom of the sort documentation itself.

      perldoc sort

      - Miller

      Comment

      Working...