in reply to Re^4: Sending a packet and getting reply.in thread Sending a packet and getting reply.
There's a (fairly trivial) example in the synopsis of the Socket module - is this what you were after?