There's more than one way to do things | |
PerlMonks |
Help with pack errorby taack (Initiate) |
on Mar 20, 2012 at 22:19 UTC ( [id://960672]=perlquestion: print w/replies, xml ) | Need Help?? |
taack has asked for the wisdom of the Perl Monks concerning the following question: I'm trying to use pack to create an ISO8583 set of bit flags. But, I'm running into a problem whenever the most significant bit is set. For instance, pack( "B8", "10000000" ) yields "\302 \200" rather than "\200", pack( "B8", "11000000" ) yields "\303 \200" rather than "\300". Is this a bug in the pack routine or am I missing something in the format string? Any help would be appreciated.
Back to
Seekers of Perl Wisdom
|
|