Since no one else has mentioned it, are you sure that nested hashes are appropriate here? In particular, you seem to have a hash mapping consecutive small integers to values. You might consider using an array for that instead. Something like
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;
}
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.