print "Type in a sentence, and I'll translate it dontcha know. Type quit when you're done, if you feel like it that is.\n"; while($a=<> and $a ne "quit\n"){ chomp $a; open(ANIMALS,"animals.txt"); while(chomp ($b=)){ $a =~ s/$b/cow/i;} @b=split(/(\s)/i,$a); foreach(@b){s/yes|sure|okay/you bet/i; s/\./ dontcha know./i; } print @b; close ANIMALS; }