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.
In reply to Re^5: Possible for Map to create Hash of Hash?
by vsespb
in thread Possible for Map to create Hash of Hash?
by konnjuta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |