perlquestion
sunadmn
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??
<code>
#!/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();
}
</code>
<div class="pmsig"><div class="pmsig-233158">
<B>SUNADMN</B><br>
<B><I>USE PERL</I></B>
</div></div>