#!/usr/bin/perl use Sys::Syslog qw(:DEFAULT setlogsock); my $hostname = shift || 'localhost'; my $options = 'ndelay'; # open the connection immediately my $facility = 'local0'; # one of local0..local7 my $priority = 'info'; # debug|info|notice|warning|err... setlogsock 'unix'; openlog $hostname, $options, $facility; while (<>) { chomp; syslog $priority, $_; } closelog;