Changeable words: Difference between revisions
Content deleted Content added
Added Go |
|||
Line 240: | Line 240: | ||
51: upperclassman -> upperclassmen |
51: upperclassman -> upperclassmen |
||
52: upperclassmen -> upperclassman |
52: upperclassmen -> upperclassman |
||
</pre> |
|||
=={{header|Perl}}== |
|||
<lang perl>#!/usr/bin/perl |
|||
use strict; |
|||
use warnings; |
|||
my @words; |
|||
@ARGV = 'unixdict.txt'; |
|||
while( <> ) |
|||
{ |
|||
chomp; |
|||
length > 11 or next; |
|||
for my $prev ( @{ $words[length] } ) |
|||
{ |
|||
($prev ^ $_) =~ tr/\0//c == 1 and printf "%30s <-> %s\n", $prev, $_; |
|||
} |
|||
push @{ $words[length] }, $_; |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
aristotelean <-> aristotelian |
|||
claustrophobia <-> claustrophobic |
|||
committeeman <-> committeemen |
|||
committeewoman <-> committeewomen |
|||
complementary <-> complimentary |
|||
confirmation <-> conformation |
|||
congresswoman <-> congresswomen |
|||
councilwoman <-> councilwomen |
|||
craftsperson <-> draftsperson |
|||
eavesdropped <-> eavesdropper |
|||
frontiersman <-> frontiersmen |
|||
handicraftsman <-> handicraftsmen |
|||
incommutable <-> incomputable |
|||
installation <-> instillation |
|||
kaleidescope <-> kaleidoscope |
|||
neuroanatomy <-> neuroanotomy |
|||
newspaperman <-> newspapermen |
|||
nonagenarian <-> nonogenarian |
|||
onomatopoeia <-> onomatopoeic |
|||
philanthrope <-> philanthropy |
|||
prescription <-> proscription |
|||
schizophrenia <-> schizophrenic |
|||
shakespearean <-> shakespearian |
|||
spectroscope <-> spectroscopy |
|||
underclassman <-> underclassmen |
|||
upperclassman <-> upperclassmen |
|||
</pre> |
</pre> |
||