in reply to log file analysis

You can try open a file in NON BLOCK MODE like below:-
sysopen(RFD, "/usr/local/apache/logs/access_log", O_NONBLOCK); while(1){ my $buffer = <RFD>; # Do some thing with the line }
I use this to check my access logs.