################################################### ## # ## 6/2/20 # ## Program prints out a report out of birthdays # ## hash table only if name AND birthday exist # ## in hash # ## # ################################################### my %birthdays = ( Fred => 'June 1', Ray => 'May 31', Glenn => 'May 27', Bob => 'August 28', Jim => '', Paul => undef, ); print"\nName Birthday\n"; print "-" x 25 ."\n"; foreach my $name ( keys %birthdays) { if (exists $birthdays{$name} ) { print " $name $birthdays{$name}\n"; } }