- or download this
my @arr = qw( cool guy here );
my $str = "I am cool";
...
if ($str =~ $re) { # if ($str =~ /^$re$/) {
print "Matched\n"; # print "Equals\n";
} # }
- or download this
use Regexp::List qw( );
...
if ($str =~ $re) { # if ($str =~ /^$re$/) {
print "Matched\n"; # print "Equals\n";
} # }
- or download this
my @arr = qw( cool guy here );
my $str = "I am cool";
...
if (grep {index($str,$_)!=-1} @arr) { # if (grep {$str eq $_} @arr) {
print "Matched\n"; # print "Equals\n";
} # }