my $utf = Unicode::Japanese->new(); my $oldmsg = ''; ReadMode('cbreak'); sub show_message($){ print $utf->get; } sub set_enc($){ while(1){ print "Enter encoding(UTF8(u) / SJIS(s) / EUC-JP(e)):"; my $enc = ReadKey 0; last unless defined $enc; print "\n"; if($enc eq 'u'){ $utf->set($_[0] , 'utf8'); return; } elsif($enc eq 'e'){ $utf->set($_[0] , 'euc-jp'); return; } elsif($enc eq 's'){ $utf->set($_[