#!/usr/local/bin/perl -w use strict; use Sys::Syslog; my $date = `date '+%d%m%Y:%H%M%S'`; my $mesg = "======== Start =======\n"; $mesg .= "TIME :\t $date\n"; $mesg .= "\n"; $mesg .= "========The end==========\n"; print $mesg; openlog( 'status', 'ndelay', 'daemon' ); syslog('warning', '%s', $mesg); closelog();