- or download this
my $something = 'This is a bang of a bing thing';
...
if($something =~ m/($list)/i) {
print "Found '$1' in '$something'\n";
}
- or download this
my @search = $something =~ m/($list)/ig; # <- added the g modifier
- or download this
while ($something =~ m/($list)/ig) {
print "Found '$1' in '$something'\n";
}
- or download this
use strict;
...
if ($something =~ m/(@list)/i) {
print "Found '$1' in '$something'\n";
}
- or download this
Found 'bing bong bang' in 'This is a bang of a bing thing bing bong ba
+ng'