in reply to How do I print nested hashes
my %Recipes = ( "YumYumStuff" => { ingredients => [ "1 Pate a Bombe", "1/2 French Meringue", "300ml double cream", "3 very ripe bananas", "2 tablespoons Creme de Banane", "1 Bitter Chocolate Sorbet", ], instructions => [ "Whisk together the pate a bombe and the French Meringue mixt +ures. They should be roughly equal in amounts by volume.", "Lightly whip the cream to the same consistency as the pate d +e bombe and French Meringue mixture then mix both mixtures together", "Finally, whisk in the banana puree and liquer. Pour or pipe + into ramekins, a long loaf tin or a large freezer container. ", "About 30 mins before serving, transfer the parfait from the +freezer to the refrigerator", ], } ); for $recipe (keys %Recipes) { print "For $recipe the ingredients are :\n"; $ref = $Recipes{$recipe}{ingredients}; my $i; print map ++$i." = $_\n", @$ref; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do I print nested hashes
by bobf (Monsignor) on Aug 30, 2004 at 16:03 UTC |