#!/usr/local/bin/perl require 'jcode.pl'; my $rest = $ARGV[0]; my $hex ; my $string; while ( $rest ne '' ) { if ( $rest =~ /^\\x([0-9A-F][0-9A-F])(.*)/i ) { $hex = $1 ; $rest = $2 ; $string .= pack('C',hex($hex)) }}; print jcode::jis($string, 'sjis'),"\n"; __END__ \x8d\xd7\x96\xbe\x92\xa9\x91\xcc