#!/usr/bin/perl -w # demonstration of writing to syslog from perl ## use strict; use warnings; use diagnostics; use Sys::Syslog qw(:DEFAULT setlogsock); my $fac = 'local1'; openlog( $0, 'cons,pid', $fac); syslog( 'notice', 'logging an event: %d', time); closelog();