In
do_log you are calling a subroutine called
move, what does that do? Did you mean
rename perhaps? It's an easy mistake to make - the UNIX program mv(1) calls the kernel API rename(2), which is also called by Perl (on Windows the command-line program is called rename but the API is called MoveFile!). However, I would have thought that you would have at least got a warning for that.
In
check_nr_of_line you are using
$fh, which is a bit suspicious since you
close $fh in
do_log. Check the return code from the
seek?