use Encode; # pick one of the following lines to uncomment # (depends on what sort of display terminal you use): #binmode STDOUT, ":utf8"; #binmode STDOUT, ":encoding(shiftjis)"; $_ = join( '', map { chr() } 0x21 .. 0x7e ) . "\n"; # this is a test string print; s/([!-~])/chr(ord($1)+0xFEE0)/eg; # convert plain ASCII to CJK fullwidth ASCII # print; # uncomment this when you have chosen which binmode line to use