http://www.perlmonks.org?node_id=661042


in reply to Mapping an array to a string

Hi chuck_norris

Did you want to do something like this

use strict; my @AoH = ( {'Lead'=>'fred','Friend'=>'barney'}, {'Lead'=>'george','Wife'=> 'jane','Son'=>'elroy'} ); my $string = \@AoH; for my $href ( @$string) { for my $role ( keys %$href ) { print "$role:$href->{$role}\n"; } }

Punitha