One potential problem is here:
- $file_stat = stat(DATA_log);
the stat() function returns a list so you have to assign its value to a list or array:
Later you use $file_stat as if its an object:
- $new_acces=$file_stat->mtime;
Are you using a module that creates an object?
You very much need to add "strict" and "warnings" to your perl program and note all the errors and fix them and post back here if you have more questions.
- use strict;
-
use warniings;
-
use diagnostics;
-
diagnostics will return more verbose nessages concerning the errors or warnings but it is optional.