Olivier, Wim W wrote:
Hi all,
Hello,
I get an error running this script on Win32 , but when I execute the actual
command it works 100%. Does anyone see my problem here?
The error I get is: "Error: Invalid message text."
The debugger goes through fine, but complains at the 'system()' line.
notify_jcc("user", "err", "THIS IS A TEST MESSAGE");
sub notify_jcc {
my $sysloghost = "sysloghost.domain.com";
my $logger = "C:\\Program Files\\KLOG\\klog.exe";
($facility, $level, $message) = @_;
print "$sysloghost\n";
print "$logger\n";
print "$facility\n";
print "$level\n";
print "$message\n";
system("$logger", "-h $sysloghost", "$facility", "$level", "$message");
}
system() accepts either a single string or a list so either:
system( "$logger -h $sysloghost $facility $level $message" );
Or:
system( $logger, '-h', $sysloghost, $facility, $level, $message );
perldoc -f system
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>