Help for this page

Select Code to Download


  1. or download this
    sub mylog {
        my (@fields) = @_;
    ...
        print $fh $entry . "\n";
        close $fh;
    }
    
  2. or download this
    #untested!
    open my $fh, "|bin/rotatelogs /var/logs/%y_%m_%d_%H_%M_%S 14400" or di
    +e "can't open pipe to rotatelogs: $!";