Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Printing byte as 2 Hex characters

by KevinZwack (Chaplain)
on May 31, 2012 at 01:21 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://973408]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2024-04-19 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found