Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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


Comment on Re^3: Printing byte as 2 Hex characters
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-12-27 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls