my $s = 'John'; print $s if -1 != index $str, $s;