1 use IO::Socket; 2 my $sock = new IO::Socket::INET ( 3 PeerAddr => '192.168.1.2', 4 PeerPort => '1515', 5 Proto => 'tcp', 6 ); 7 die "Could not create socket: $!\n" unless $sock; 8 print $sock "Hello there!\n"; 9 close($sock); #### my $s = pack( 'H*', $hexcommand );