3 # Modify the crew roster program to add a location field for each castaway.
4 # At the start, set each person's location to "The Island." After you've
5 # added that field to each person's hash, change the Howells' locations to
6 # "The Island Country Club." Make a report of everyone's location, like
9 # Gilligan at the Island
10 # Skipper at the Island
11 # Mr. Howell at the Island Country Club
12 # Mrs. Howell at the Island Country Club
23 position => 'First Mate',
29 position => 'Captain',
35 position => 'Passenger',
37 my %mrshowell_info = (
38 name => 'Mrs. Howell',
41 position => 'Passenger',
44 my @crew = (\%gilligan_info, \%skipper_info, \%mrhowell_info, \%mrshowell_info);
46 foreach my $crewmember (@crew) {
47 $crewmember->{location} = 'The Island';
52 printf("%s at %s\n", $_->{name}, $_->{location});
56 $mrhowell_info{location} = 'The Island Country Club';
57 $mrshowell_info{location} = 'The Island Country Club';