sunadmn has asked for the wisdom of the Perl Monks concerning the following question:
For some reason I am not getting anything to syslog and I am lost to where I went wrong. Anyone have any ideas on this one??
#!/usr/bin/perl use strict; use Sys::Syslog; my $dir = "/usr/local/chaser/"; my $file = "load_data_file.*"; my $ls = '/bin/ls'; my $wc = "/bin/wc -l"; my $cmd = "$ls $dir" . "$file \|" . "$wc"; open(RET, "$cmd |"); chomp(my @return = <RET>); close(RET); if(@return >1) { openlog("files", "user", "system"); syslog('alert', '%s', 'this is a test'); closelog(); }
SUNADMN
USE PERL
USE PERL
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Sys::Syslog no output
by McDarren (Abbot) on Jan 23, 2006 at 17:55 UTC | |
by sunadmn (Curate) on Jan 23, 2006 at 18:15 UTC | |
Re: Sys::Syslog no output
by radiantmatrix (Parson) on Jan 23, 2006 at 17:55 UTC | |
Re: Sys::Syslog no output
by ides (Deacon) on Jan 23, 2006 at 17:27 UTC | |
by sunadmn (Curate) on Jan 23, 2006 at 17:33 UTC | |
Re: Sys::Syslog no output
by idsfa (Vicar) on Jan 23, 2006 at 17:54 UTC |
Back to
Seekers of Perl Wisdom