while (1) { print "Word: "; chomp(my $text = ); last if ($text eq 'q'); translate($text); }