#!/afs/athena/contrib/perl/perl

$dict = shift;

open(DIC, "/usr/dict/words");

print("Getting dictionary\n");
while(<DIC>){
	$word[$n] = $_;
	$n++;
}
print("done...\n");


foreach $i (0..$#word) {
	$tword{$word[$i]}= $word[$i  + 10];
}
print("Done coding...\n");


$message = &gettext();

foreach $i (0..$#word){
	s/$word[$i]/$tword{$word[$i]}/g;
}
print $message;
sub gettext{
    local($msg);
    $msg = "";
        print("End with a . on a line by itself.\n");
        while($line ne ".\n") {
                $msg = $msg.$line;
                $line = (<STDIN>);
        }
        $msg;
    }



