sprintf or pack



How to use pack or sprintf do the same thing?

$b='A';
$a=ord($b);
print int($a/16) . ($a % 16) ;


.