Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Printing byte as 2 Hex characters

by KevinZwack (Chaplain)
on May 31, 2012 at 01:21 UTC ( #973408=note: print w/replies, xml ) Need Help??


in reply to Re^2: Printing byte as 2 Hex characters
in thread Printing byte as 2 Hex characters

Here is one I didn't see listed that I often use for debugging...

printf "0x%*v2.2X\n", ' ', $payload;

If $payload is several bytes of data, this will print something like:

0x01 02 03 CF

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://973408]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2017-12-16 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (458 votes). Check out past polls.

    Notices?