in reply to Re^2: Sorting an array of hashes and filenames
in thread Sorting an array of hashes and filenames
That sorted it perfectly: Exactly as you told it to.
By the hash values, not the keys. The values of the hash (as you've constructed it) are the filenames, and if you'll notice, those are precisely in order.
Take out the {$file_hashes{$a} cmp $file_hashes{$b}}. It isn't what you want. (If you really want to put something there, put in {$a cmp $b}, but that's the default...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Sorting an array of hashes and filenames
by learningperl01 (Beadle) on Jan 14, 2009 at 23:28 UTC | |
by DStaal (Chaplain) on Jan 15, 2009 at 14:07 UTC |