use encode; print "hallo\n"; $i = hex(223); $foo = Encode::encode( "UTF-8", "\x{$i}" ); print unpack( "H*", $foo ) . "\n";