in reply to Re: How to sort Hashes of Hashes and print results in a file
in thread How to sort Hashes of Hashes and print results in a file

Thanks a million gulden. Your script results are exactly what I want.
I was introduced to perl only a week ago so still learning as I code more.

Once again Thanks all for your help. Very much appreciated
Stan
  • Comment on Re^2: How to sort Hashes of Hashes and print results in a file

Replies are listed 'Best First'.
Re^3: How to sort Hashes of Hashes and print results in a file
by gulden (Monk) on Mar 28, 2009 at 03:19 UTC
    If you want to sort "numbers" instead of "strings" for the first level keys of the hash, then replace
    foreach my $k1 (sort keys %hash){
    with
    foreach my $k1 (sort {$a <=> $b} keys %hash){