use Sys::Syslog; openlog $0, 'pid', LOG_USER; #prepend progname and pid syslog('warning', "printf formated %s", $string); closelog;