$ ./send_syslog.pl syslog_server "test message" $ ./send_syslog.pl xx.xx.xx.xx "test message"
#!/usr/bin/perl use strict; use warnings; use Sys::Syslog qw(:DEFAULT setlogsock); my $ident = "test"; my $logopt = "pid"; my $facility = "local0"; my $priority = "info"; my ($sv, $msg) = @ARGV; setlogsock("udp"); $Sys::Syslog::host = $sv; openlog($ident, $logopt, $facility); syslog($priority, $msg); closelog();