in reply to Re^2: Sort of anonymous hash
in thread Sort of anonymous hash

It is, indeed.
ikegami's response was surely the most correct, because with no transformation involved, direct access is always faster.

My question was to illustrate a point, i.e. if there was some perl placeholder to accomodate for an anonymous hash being created by another function.

Replies are listed 'Best First'.
Re^4: Sort of anonymous hash
by ikegami (Patriarch) on Sep 30, 2009 at 10:31 UTC
    Yes. They're called variables.
    for my $d (sort {$descs->{$a} cmp $descs->{$b}} keys %{ $descs = {map +{$_ => $hash{$_}{desc}} keys %hash}} ) { ... ... }
      You made me laugh (for real!) Anyway, inline declaration is actually the solution closest to what i initially thought. Thanks and have a nice day