use utf8; my $converted = Encode::decode("UTF-16", $your_variable); $converted =~ /some Japanese text/;