my $body = 'this is a test email. It contains the word training in its second sentence.'; if( $body =~ /training/ ) { print "The body contains the word 'training'\n"; };