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