coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:
As you can see, it goes KEY => value1|value2. How can I sort the hash by the first split value? You can see that it's a date, so I really need the newest date on top.index.html => Mon Oct 11 00:08:11 2004|12963 screenshot.jpg => Sun Oct 10 13:18:30 2004|234997 legal.html => Mon Oct 11 12:57:03 2004|13448 stylesheet.css => Mon Oct 11 13:57:28 2004|697 about.html => Mon Oct 11 00:08:08 2004|13225 archive.html => Mon Oct 11 00:08:09 2004|12872 postinfo.html => Fri Oct 1 23:49:15 2004|2457 contact.shtml => Mon Oct 11 00:09:48 2004|11366 services.html => Mon Oct 11 00:08:17 2004|14256 metatags.pl => Mon Oct 11 14:05:44 2004|28668 tools.html => Mon Oct 11 15:35:47 2004|14632 robots.txt => Sat Oct 9 03:35:15 2004|73 _vti_inf.html => Fri Oct 1 23:49:15 2004|1754 report.shtml => Mon Oct 11 00:07:03 2004|11686
Any pointers?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sorting a split hash
by Velaki (Chaplain) on Oct 12, 2004 at 04:03 UTC | |
by shenme (Priest) on Oct 12, 2004 at 04:39 UTC | |
by sulfericacid (Deacon) on Oct 12, 2004 at 04:10 UTC | |
|
Re: sorting a split hash
by davido (Cardinal) on Oct 12, 2004 at 04:47 UTC | |
|
Re: sorting a split hash
by NetWallah (Canon) on Oct 12, 2004 at 04:05 UTC | |
|
Re: sorting a split hash
by pg (Canon) on Oct 12, 2004 at 03:40 UTC | |
by coldfingertips (Pilgrim) on Oct 12, 2004 at 03:51 UTC | |
by pg (Canon) on Oct 12, 2004 at 04:14 UTC | |
|
Re: sorting a split hash
by TedPride (Priest) on Oct 12, 2004 at 09:40 UTC |