use strict; my %hash; my $key='NetWallah'; $hash{$key} = [ map{ [ map {int(rand()+0.5)} 0..9 ] } 0..9 ]; printit(\%hash); sub printit{ my $href=shift; for my $key(sort keys %$href){ my $row = 0; print "{$key} =>\n"; for my $rowref (@{$href->{$key}}) { print " $row\t"; for my $val (@$rowref) { print "$val "; } $row++; print "\n"; } } }
"How many times do I have to tell you again and again .. not to be repetitive?"
In reply to Re^2: hash pointing to AoA
by NetWallah
in thread hash pointing to AoA
by sovixi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |