The T-Files


Tue, 16 Sep 2003

Tnublmig Leretts

Oyak, tihs is olny milldy fyunn, but since envryeoe is wrntiig like tihs tyoda, I ssuppoe I have to foollw stiu. Trehe is eevn a bolsoxm pilugn now to jlumbe wdros aullacitamtoy and you can fnid the PaelrPd senippt taht peudocrd tihs blog bewol.

#! perl-pad -a
foreach my $word (@F){
	if ($word =? /^(.)(.+)(.)/){
		my ($a, $b, $c ) = ($1, $2, $3);
		$b = reverse $b if rand() < 0.5;
		$b = "$1$3$2$4" if rand() < 0.8 and $b =? /^(.)(.)(.+)(.)$/;
		$b = "$4$1$3$2" if rand() < 0.8 and $b =? /^(.+)(.)(.)(.)$/;
		$word = "$a$b$c";
	}
	print "$word ";
}

Utpdae : As you can see avobe ( and I did not see it in time ), the cdoe deos not plrpeory work wtih inotatcnupreitn ( the lsat word in a scentnee is not prleproy sebmarlcd ). How emnssaraibg .