while ($line = ){ if ($line =~ /t/){ print "hi"; } } #### while ($line = ){ if ($line =~ /te/){ print "hi"; } }