This doesn't sort the hash, it only converts the date from D/M/YYYY to YYYY/MM/DD so that it can be used as a key in your %datecount hash. This hash can be sorted the way you do it in your code fragment.
As to qw:
It returns a list of words without doing interpolation on them. It is just a convenient way of writing:$ perldoc -f qw qw/STRING/ Generalized quotes. See "Regexp Quote-Like Operators" in perlop.
my @dates = ('5/7/2001' '3/10/2005' '1/1/1996' '2/1/1993');
Hope this helps, -gjb-
In reply to Re^3: Sorting Dates
by gjb
in thread Sorting Dates
by josephjohn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |