kvclarkusa has asked for the wisdom of the Perl Monks concerning the following question:
The second line's 'some_TEMPLATE' is where I am running into problems - I have not figured out what pack characters should be used there. (For what it's worth, the equivalent java method that does what I need is DataOutputStream.writeBytes().) Any help would be greatly appreciated... Ken$my_value = "ABCDEF"; # the string value of what I need to send $my_value = pack ('some_TEMPLATE',$my_value); # transform it into a 1 +byte value for the network server print $socket $my_value; # send it to the server
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: packing a string into binary
by dws (Chancellor) on Dec 11, 2001 at 09:26 UTC | |
by Anonymous Monk on Dec 11, 2001 at 10:30 UTC |