Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How to get hexadecimal output in specific format?

by Tux (Canon)
on Jun 05, 2013 at 05:41 UTC ( [id://1037130]=note: print w/replies, xml ) Need Help??


in reply to How to get hexadecimal output in specific format?

my $hex = sprintf "%08X", $dec;

It is all in the docs

$ perldoc -f sprintf : %X like %x, but using upper-case letters : 0 use zeros, not spaces, to right-justify

Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found