#!/usr/bin/perl -w use strict; use warnings; my $input; my $name; my %directory = (); print " Welcome to your own Personal Address Book!\n"; print " What would you like to do?\n"; print "add Add An Entry del Delete An Entry prn Print all Entries end End Porgram Choice: \n"; chomp ($input = <>); for ($input eq "end") { if ($input eq "add") { print "Enter the Name you would like to add: \n"; chomp ($name = <>); for ($input eq "add") { print "Enter an Address for $name\n"; chomp (my $address = <>); $directory{$name} = $address; print "add Add An Entry del Delete An Entry prn Print all Entries end End Porgram Choice: \n"; chomp ($input = <>); } } elsif ($input eq "prn") { print "These are the people in your address book\n"; my @completed = keys %directory; foreach my $who (@completed) { printf "%15s Name: Address: %s\n", $who, $directory{$who}; } last; } }