http://www.perlmonks.org?node_id=1053077


in reply to Printing a int as hex

printf "%02x\n", $hash{$x};