$|=1; # So it works in the Open Perl IDE

%names = ("Bill" => "Clinton",      # use the nice way of defining a hash
          "Barack" => "Obama",
          "George" => "Bush",
          "Jimmy" => "Carter");

print "Type in a first name:\n";
$n = <STDIN>;
chomp $n; # remove the \n. Important or the string won't match!
print "$n" . "'s last name is $names{$n}"; # we are using the . operator so we get around the $n's problem
