Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Printing a int as hex

by toolic (Bishop)
on Sep 09, 2013 at 19:00 UTC ( [id://1053080]=note: print w/replies, xml ) Need Help??


in reply to Printing a int as hex

Since your hash values are decimal values (not hex strings), there is no need to use hex:
use warnings; use strict; my %hash = (x => 10); foreach my $x (keys %hash) { printf "%02x\n", $hash{$x}; } __END__ 0a

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1053080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-18 21:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found