Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 chilling in the Monastery: (10)
As of 2015-07-31 10:53 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 (276 votes), past polls