in reply to Re: Hash key ordering question
in thread Hash key ordering question

that will actually sort in string comparison order (the default for sort). for numeric order, you want:
... foreach $key1 (sort {$a <=> $b} keys %hshFoo) { ...

Replies are listed 'Best First'.
Re: Re: Re: Hash key ordering question
by P0w3rK!d (Pilgrim) on May 07, 2003 at 19:18 UTC
    This is what I was looking for. I was trying to do something with Tie::IxHash the last 10 minutes.
    my $t = Tie::IxHash->new(%hshFoo); my @keys = $t->Keys; $t->Reorder(@keys); $t->SortByKey; untie %hshFoo; ...or something

    -P0w3rK!d

Re: Re: Re: Hash key ordering question
by jgallagher (Pilgrim) on May 07, 2003 at 21:55 UTC
    Thanks. That completely slipped my mind.