open( LOG, '>>tmp.log'); #open tmp.log for appending print LOG 'hello'; #print hello to LOG file handle #### use Sys::Syslog; openlog $0, 'pid', LOG_USER; #prepend progname and pid syslog('warning', "printf formated %s", $string); closelog;