while(<>){ if(/the/){ #does $_ contain the print "Your line of text contains the word 'the'\n"; } }