my $username = "$lname, $fname"; %new_hash; $new_hash{$username} = $password; while() { print "Please enter a last name and a frist name.\n"; chomp ($input =); { foreach ($input) { if (exists $new_hash{$username}) { print "The username is $username and the password is $new_hash{$username}\n"; last; } else { print "I'm sorry, there is no one here by that name!\n"; last; } }