use Encode; binmode STDOUT, ':encoding(UTF-8)'; require 'russian.pl'; my $en = 'Hello'; printf "English: %s, Russian: %s\n", $en, MyPackage::ru::translate($en); #### package MyPackage::ru; use utf8; # Tells Perl to interpret this source file as utf8 use Carp; # Very crude translation table my %trans = ( # XXX - Note actual code contains the literal utf8 characters, # not any kind of escapes. PerlMonks insists on converting # them to HTML character entities. hello => 'привет', ); sub translate { $trans{ lc $_[0] } || croak 'No translation for '.$_[0] }