Perl Programming Help:
Win32 Programming Help:
May 3, 2002, 3:35 AM
I need some help with a sockets problem. I have a string eg "123123hello" that I convert to 16 bit using the pack and unpack functions.
I add this to an array and send it over the wire ... okay.
But my problem is that I need to add a hex bit (0x00) before and after the packet and I don't know exactly how to do this. I've tried adding \x00 to the start and end of the array but it gets sent as the letter S.
Anyone help ???
May 9, 2002, 9:38 AM
Re: [Knoxy] Sockets problem
We meet again.
Try taking your array, and redefine it something like this:
my @data = # pack/unpack magic you are doing...;
@data = (0x00, @data, 0x00);
Hope that helps.
print unpack"u*",pack "h*",$a,"\n\n";