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