in reply to Sending raw hex in UDP packets

I hope Belsander doesn't mind me adding another question to his post given it's nearly the same question. Oppose to creating hex and sending it via UDP, I'm reading it out of a file. I have the same issue as Belsander in that the hex will arrive if I send it like this.
$socks->send('\xa1\xb1\xc1\xd1')
The file I'm using has the same format, each line looks like this (except it's about 50 bytes per line)
\xa1\xb1\xc1\xd1\xe1 \xa2\xb2\xc2\xd2\xe2
The actual code:
use strict; use warnings; use IO::Socket; my $socks = IO:Socket:INET->new( Proto => 'udp', PeerPort => 5010, PeerAddr => '101.101.101.101', ) or die "It didn't work. $! \n" my $file = 'values.hex'; open my $info, $file or die "It didn't open $file. $! \n"; while(my $line = <$info> { $socks->send($line) or die "Nope, can't send that. $! \n"; }
Any solutions would be gratefully received thanks.