in reply to Converting HoA into AoH
use Data::Dumper; use strict; use warnings; my $HoA = { flintstones => [ "fred", "barney" ], jetsons => [ "george", "jane"], }; my $AoH; for my $flintstone (@{$HoA->{"flintstones"}}) { for my $jetson (@{$HoA->{"jetsons"}}) { push @$AoH, {"flintstones" => $ flintstone, "jetsons" => $jets +on}; } } print Dumper($AoH);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Converting HoA into AoH
by Moron (Curate) on Nov 01, 2005 at 12:59 UTC | |
by Anonymous Monk on Nov 01, 2005 at 16:27 UTC |
In Section
Seekers of Perl Wisdom