in reply to Array of Hashes in subroutines.
You can make use of the flexibility of referencing and dereferencing to re-write
in a briefer and yet robust way. you don't want to index a hundred-element array manually now, do you?foreach $i (sort keys (%{$ref01[0]})) { print "$i: ${$ref01[0]}{$i} ${$ref01[1]}{$i} ${$ref01[2]}{$i}\n"; }
An interesting documentation page is perlcheat at http://perldoc.perl.org. You can access the same from your command console, type perldoc perlcheat. Best of luck and have a nice perl journey ..foreach $i (sort keys (%{$ref01})) { print "$i: @{$ref01->{$i}}\n"; }
|
|---|