in reply to Handling caps for surnames with capitals in the middle (was: Irish Surnames)
The output from the above code I get ismy @List = qw/ Mac Mc De /; my @NAMES = map ucfirst, qw/ mcginley macgee develera/; for my $name (@NAMES) { for my $match( grep {$name =~/^$_/} @List ) { warn $name; $name =~ s/^\Q$match\E(.*)$/$match.ucfirst($1)/e; warn $name; } }
Mcginley at - line 6. McGinley at - line 8. Macgee at - line 6. MacGee at - line 8. Develera at - line 6. DeVelera at - line 8.
|
---|