#!/usr/bin/perl
use strict;
my (@gerbal) = (
'Nawbie',
'Nbwbie',
'Newbie',
'Niwbie',
'Niwbee',
'Nmwbie',
'Nowbie',
'Nuwbie',
);
foreach my $foot (@gerbal) {
print "$foot -- ";
if ($foot =~ /N[aeiou]wbie/) {
print " match found.\n";
} else {
print " no match.\n";
}
}
exit;
Results:
Nawbie -- match found.
Nbwbie -- no match.
Newbie -- match found.
Niwbie -- match found.
Niwbee -- no match.
Nmwbie -- no match.
Nowbie -- match found.
Nuwbie -- match found.
|