#perl -w use strict; use warnings; use Lingua::EN::NameCase qw( NameCase nc ) ; my @proper_names = ( 'Owen ap Tudor', 'Sveinn inn Danska', 'David ben Jesse' ); my @lowercase_names = map { lc } @proper_names ; my @result = NameCase( @lowercase_names ) ; my ($iCount, $bMatch); for ($iCount = 0; $iCount <= $#result; $iCount++) { $bMatch = $proper_names[$iCount] eq $result[$iCount] ? 'Y' : 'N'; write; } exit; format STDOUT_TOP = Orignal case Output from NameCase Match ============================== ============================== ===== . format STDOUT = @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<< $proper_names[$iCount], $result[$iCount], $bMatch . __END__