Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Character in 'b' format wrapped in unpack

by ikegami (Patriarch)
on Mar 29, 2015 at 23:06 UTC ( [id://1121741]=note: print w/replies, xml ) Need Help??


in reply to Character in 'b' format wrapped in unpack

printf "%v02X\n", $x;
gives
AA.154.AA.154
You created characters that are too large for bytes, and `b` expects the characters to be bytes. Maybe
substr( $x, $_, 1 )) << 1
should be
( substr( $x, $_, 1 )) << 1 ) & 0xFF

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-19 13:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found