in reply to Matching first Letters of two words
This example fails because it'll also return true if non-alphabetic characters match. You specified "letters".
sub first_character_matches { return( ((lc shift) ^ (lc shift)) =~ /^\0/ ); }
And a command-line version to play with:
1) poerbook:~% perl -wle 'print "yes" if ( ((lc shift) ^ (lc shift)) = +~ /^\0/ )' abc DBC 1) poerbook:~% perl -wle 'print "yes" if ( ((lc shift) ^ (lc shift)) = +~ /^\0/ )' abc ABC yes
In Section
Seekers of Perl Wisdom