#!/usr/bin/perl
use strict;
my (@arrayofstrings) = ('Newbie', 'Nuwbie', 'Dewbie', 'NEwbie');
foreach my $string (@arrayofstrings) {
print "$string -- ";
if ($string =~ /N.wbie/) {
print " match found.\n";
} else {
print " no match.\n";
}
}
exit;
Results:
Newbie -- match found.
Nuwbie -- match found.
Dewbie -- no match.
NEwbie -- match found.
|