I am receiving a packet over the network using perl recv call. I am able to receive the packet but the packet is formatted in such a way that first two bytes of the packet convey information about rest of the message. I do not have a lot of programming experience in perl and I am stuck that how can I copy the first two bytes from the received packet into a different variable.
Share
You want
unpack: