Re: how to sort hash by value, where value is a valid date



perl_help_needed <nidhiyajnik@xxxxxxxxx> wrote:

> I want to sort a hash by its vlaue in perl.


perldoc -q sort

How do I sort a hash (optionally by value instead of key)?


> Could anyone help me out with this one please!!


You are expected to check the Perl FAQ *before* posting to
the Perl newgroup.


--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.



Relevant Pages

  • beginners Digest 28 May 2008 16:42:36 -0000 Issue 3467
    ... First time using Perl & PDF::API2 ... Getting Segmentation fault ... 101000 by: Rajnikant ... I use sort to give the max of an array something like this ...
    (perl.beginners)
  • Re: sorting data - hash vs. list
    ... >> this group, but I won't be posting anymore, ... >> as to follow the guidlines would yeild from me little. ... But I never ask about anything other than perl here. ... and you did not want to read all of it to sort it. ...
    (comp.lang.perl.misc)
  • Re: Misbehaving sort function
    ... >> It sounds an awful lot like you're confusing the Unix command 'sort' ... >> with the Perl function 'sort'. ... perldoc -f readline ...
    (comp.lang.perl.misc)
  • Re: How to do pattern matching for multiple files in Perl
    ... I am new to Perl and know ksh better. ... And I was told that perl is faster than ksh. ... You can read its contents with the operator, see perldoc perlop. ... You can sort a list with the sort function, ...
    (comp.lang.perl.misc)
  • Re: help on hasah usage
    ... I am new to hash usage in perl and wanted to learn more on how to use ... Read each line of the file (perldoc -f readline, ... obtain a list of keys of the hash ... sort those keys ...
    (perl.beginners)