Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Answer: How do I convert from decimal to hexidecimal?

( #162055=categorized answer: print w/ replies, xml ) Need Help??

Q&A > numbers > How do I convert from decimal to hexidecimal? contributed by line_noise

Alternatively, to get the hex in a variable:

$octet = 192; $out = pack "c", $octet; $hex = unpack "H2", $out;

Edited by davido: Added code tags.

Comment on Answer: How do I convert from decimal to hexidecimal?
Download Code
Replies are listed 'Best First'.
Re: Answer: How do I convert from decimal to hexidecimal?
by Anonymous Monk on Mar 31, 2004 at 21:43 UTC
    0x40625d9a
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2015-07-31 02:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (274 votes), past polls