use strict; use warnings; use v5.10.1; my $hexnum = sprintf ("%d", 0x47); print "$hexnum\n";