in reply to Re^4: Possible for Map to create Hash of Hash?
in thread Possible for Map to create Hash of Hash?

he can also use things like keys %{$hash{$store}} to list all products.
Agree. But does he need to?
neither shorter to write

It's shorter to write: "$h{$s,$p}" 9 characters. "$h{$s}{$p}" 10 characters. + code to populate hash is simpler.

nor more efficient

Maybe memory usage is not important in this case? And maybe serialization/deserialization time is more important. Who knows.

Also, perl has a special notation for it. That makes me think it's a useful feature for some cases.

  • Comment on Re^5: Possible for Map to create Hash of Hash?

Replies are listed 'Best First'.
Re^6: Possible for Map to create Hash of Hash?
by Anonymous Monk on May 11, 2013 at 14:56 UTC
    :D

    OP-Q: I am using a knife to cut this steak, how can I use scissors?

    You-A: As an alternative, you can use an improvised spork made of toothpicks, saves two characters!

      ++

      Excellent metaphor! 8)

      Cheers Rolf

      ( addicted to the Perl Programming Language)