in reply to Multidimesional hashs in Perl, C++, C# and Perl6
I'd write the perl 6 version slightly differently:
my %hash; %hash<A><A> = 1; %hash<A><B> = 2; %hash<B><A> = 4; %hash<B><B> = 8; for %hash<B>.kv -> $key, $value { say "$key - $value" }
It's a minor thing but using angle-brackets-as-quote-word for hash subscripts will be quite common I think once perl6 hits the streets.
|
|---|