Help for this page

Select Code to Download


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