in reply to Using associative arrays with I/O to interact with Prog. User

You have numerous syntax errors and mistypings, but you are getting there so persist! I know it is a pain to begin with, but please do not comment out use warnings and use strict. Try to understand why warnings and error messages are produced - they are your friends.

Here is my version to be getting on with, but always remember TMTOWTDI:
#!/usr/local/bin/perl #Family.pl use strict; use warnings; my %family = ('Connie' =>'Mama', 'Brandy' =>'Sissy', 'Pete' =>'Dude', 'Tristan' =>'Stinky', 'Sophera' =>'Finky', 'Priscilla'=>'BearDawg'); print"Please type in your name: "; my $name = <STDIN>; chomp $name; # It's good to chomp # Convert to lower case with uc first char $name = ucfirst(lc $name); # Check for the absence of $name as a key if( !exists $family{$name}) { print"Thank you $name for participating but you are not family.\n" +; } else { print"Hey $family{$name}, thank you for being family!\n"; }
update: corrected chop to chomp (thank-you toolic)