Beta Shell
v2.0 ยท web2.us.cloudlogin.co
[FM]
[CMD]
[PHP]
[DB]
[INFO]
[SEC]
File Manager
~
/
usr
/
share
/
doc
/
perl-Sys-Syslog
/
eg
Upload
3 items
Name
Size
Perms
Modified
Actions
[ .. / .. ]
syslog.pl
322 B
-rw-r--r--
2016-05-05 11:11:19
Edit
Del
Editing: syslog.pl
(322 B)
Path: /usr/share/doc/perl-Sys-Syslog/eg/syslog.pl
Back
#!/usr/bin/perl use strict; use warnings; use Sys::Syslog; die "usage: $0 facility/priority message\n" unless @ARGV; my ($facility, $priority) = split "/", shift; my $message = join " ", @ARGV; openlog($0, "ndelay,pid", $facility) or die "fatal: can't open syslog: $!\n"; syslog($priority, "%s", $message); closelog();