use warnings; use strict; my %hash = (x => 10); foreach my $x (keys %hash) { printf "%02x\n", $hash{$x}; } __END__ 0a