in reply to Re: Sorting a hash of a hash using anonymous subs
in thread Sorting a hash of a hash using anonymous subs

The reason that I use a has instead of a hashref is that it is used as a hash through the rest of the program. In order to continue this without having to rewrite everything, I just dereference it into a regular hash when I Storable::retrieve() it.

Eric

  • Comment on Re^2: Sorting a hash of a hash using anonymous subs

Replies are listed 'Best First'.
Re^3: Sorting a hash of a hash using anonymous subs
by Moron (Curate) on Jul 28, 2006 at 09:46 UTC
    I'm not pushing that issue then, but you could still do something like this:
    for my $mainkey ( sort keys %copy ) { my $subref = $copy{ $mainkey }; my $total = $subref -> { Total }; my $value = $subref -> { Value }; # process $mainkey, $total and $value ... }

    -M

    Free your mind