in reply to Write to rsyslog

Your problem is that "/dev/tcp" is a virtual path only understood by bash. You can't use that path from any other environment.

In perl, you would need to actually open that socket, for example using IO::Socket::INET

I don't recommend that, though, since there are many other ways to interact with syslog. If regular syslog is ok (as opposed to rsyslog) you can use Perl's built-in Sys::Syslog module.

SYNOPSIS use Sys::Syslog; # all except setlogsoc +k() use Sys::Syslog qw(:standard :macros); # standard functions & + macros openlog($ident, $logopt, $facility); # don't forget this syslog($priority, $format, @args); $oldmask = setlogmask($mask_priority); closelog();