in reply to Problem with simple program reading from STDIN

#!/usr/bin/perl use strict; while(my $temp = <STDIN>) { chomp $temp; # removes the "\n" from the end. if ($temp eq "yo") { print "whats up\n"; } elsif ($temp eq "not much") { print "cool\n"; } }

you need the 'chomp' to remove the "\n" from the line you read in. it also looks like you'll want to loop to get the next line and the next line ... from the user.