in reply to running backwards on a hash

Do you mean something like:

foreach (reverse keys %hash) { }

But, you should note that hashes are unordered so you can never guarantee the order that you'll get the keys back.

--
<http://www.dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg

Replies are listed 'Best First'.
Re: Re: running backwards on a hash
by hotshot (Prior) on Dec 11, 2001 at 14:27 UTC
    But does reversing on the keys of the same hash will always return the same array (reversed to keys) ?

    Hotshot

      As long as you don't change the hash, then all calls to keys (and therefore reverse keys) will return the same list, in the same order. If you modify the hash inbetween calls to keys then anything could happen.

      Blessed Be
      The Pixel

        Thanks guys, it realy helped

        Hotshot