Improved Perl scripts for log analysis