|P is for Practical|
string, or integer?by Ryszard (Priest)
|on May 10, 2004 at 14:57 UTC||Need Help??|
Ryszard has asked for the
wisdom of the Perl Monks concerning the following question:
Its the end of a very long day, and i'm a bit stuck.
I need to send two bytes to a daemon to let it know the message length, the bytes have to bytes and not an ascii representation of bytes.
For example, I want 00001001, not 00111001.
unpack("B*", int(length($msg)/256)) yeilds the latter, not the former, how do I force the case?