in reply to Re: sorting hashes
in thread sorting hashes

The same cmt I already gave to the OP applies: this can't be what he wants for it wouldn't even compile. Correcting the typo indeed this could be what he wants.

Oh, and BTW:

print $k1 $k2;
Aren't we missing something here too?!?

Replies are listed 'Best First'.
Re^3: sorting hashes
by olecs (Scribe) on Apr 20, 2005 at 07:49 UTC
    Hello again,
    the = sign was a typo that is not present in my original code - sorry about that, same with the print statement - was just to indicate that there was some output.

    The solution was indeed to use sort with just $a and $b - yep, Perl is not my first language.

    Thank you all for the exceptionally quick replies.

    rgds,
    Ole C.
      Hello again,
      the = sign was a typo that is not present in my original code - sorry about that, same with the print statement - was just to indicate that there was some output.
      There's a lesson in this, and an oft advocated one: do not retype code, paste it. (In this case not much harm was being done, but it's a good general rule to stick to, if possible.)