I really would like to make Perl accessible. Somehow giving someone the basics doesn't take being a Perl expert. You have to know something about education. College professors take no courses in education. They are not credentialed. They know too much and too little to teach first graders. The first grade teacher knows enough of the subject and enough of the person to get the job done right.

source code

%loves = ( "Tammy" => "Bob", "Susan" => "Bill", "Patricia" => "Marko" ); %girls_house = ( "Tammy" => 'Schenectady, NY', 'Susan' => 'Yonkers, NY', 'Patricia' => 'Kinderhook, NY' ); while (my ($girl, $boy) = each %loves) { print "$girl loves $boy \n"; } my %girlfriend = reverse %loves; use Data::Dumper; print Dumper \%girlfriend; for my $boy (keys %girlfriend) { print "$boy loves $girlfriend{$boy} \n"; } use Data::Dumper; print Dumper \%girlfriend; for my $boy (keys %girlfriend) { print "$boy loves $girlfriend{$boy} \n"; } %vehicle = ( "Marko" => 'Station Wagon', 'Bill' => 'motorcycle', 'Bob' => 'Volvo' ); for my $boy (keys %vehicle) { print "It is Valentine's day and $boy drove his $vehicle{$boy} and went to visit $girlfriend{$boy} in $girls_house{$girlfriend{$boy}} \n"; }

output

Patricia loves Marko Susan loves Bill Tammy loves Bob $VAR1 = { 'Bob' => 'Tammy', 'Marko' => 'Patricia', 'Bill' => 'Susan' }; Bob loves Tammy Marko loves Patricia Bill loves Susan It is Valentine's day and Bob drove his Volvo and went to visit Tammy in Schenectady, NY It is Valentine's day and Marko drove his Station Wagon and went to visit Patricia in Kinderhook, NY It is Valentine's day and Bill drove his motorcycle and went to visit Susan in Yonkers, NY

In reply to Perl Storybook, Part 2: Valentine's Day by metaperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.