Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Printing byte as 2 Hex characters

by Eliya (Vicar)
on May 30, 2012 at 15:12 UTC ( #973318=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    printf ("0x%lX ", ord $buffer);
    
  2. or download this
    $ perl -E'say unpack "H*", "foobar"'
    666f6f626172
    
  3. or download this
    $ perl -E'say "0x$_" for unpack "(H2)*", "foobar"'
    0x66
    ...
    0x62
    0x61
    0x72
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (17)
As of 2015-07-02 18: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 (44 votes), past polls