copy($currFile, $logDir. $self->{old_logs_name}. '.1') or die "Could not copy the log file because $!"; my $fh = $self->{fh}; truncate($fh, 0) or die "Could not truncate the log file because $!"; seek($fh, 0, 0) or die "Could not set the position in the log file because $!";