$fruit = "apple"; if ( $_ =~ /$fruit/) { print "$_"; }