http://qs321.pair.com?node_id=524971

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