2009-04-02 20:58:25 +02:00
|
|
|
#!/usr/bin/perl
|
2009-06-08 17:12:32 +02:00
|
|
|
# Copyright (c) 2007 Artica Soluciones Tecnologicas S.L.
|
2009-04-02 20:58:25 +02:00
|
|
|
use strict;
|
|
|
|
use IO::Socket;
|
|
|
|
|
|
|
|
if ($#ARGV != 2) {
|
|
|
|
die "Usage: $0 <address> <port> <command>";
|
|
|
|
}
|
|
|
|
|
|
|
|
my $socket = new IO::Socket::INET(Proto => "udp",
|
|
|
|
PeerAddr => $ARGV[0],
|
|
|
|
PeerPort => $ARGV[1]) || die "[error] Connect error: $@";
|
|
|
|
|
|
|
|
$socket->send ($ARGV[2]) || die "[error] Send error: $@";
|