Hi,
I'm currently writing some scripts to send bytes to a UDP server.
use IO::Socket;
$msg = '0xa';
$sock = IO::Socket::INET -> new(PeerAddr => '10.0.0.40',
PeerPort => 5525,
Proto => 'udp',
Type => SOCK_DGRAM) || die ("Socket failed : $@");
print $sock $msg;
The perl seems to work fine apart from one thing. I'm trying to send a value of 10
($msg) and what i'm getting at the server is 49.
I'm guessing this is something to do with the ascii value of '1' being 49.
Any ideas how i can send the byte value?
Thanks,
Steve