in reply to if condition

foreach $line (<$filelog>){

Should be:

while ( my $line = <$filelog> ) {

And

@$ort_log[$site_index]=substr ($line, 2, 1);

Should be:

$ort_log->[ $site_index ] = substr $line, 2, 1;

And

if ((scalar @$ort_log[$site_index])==scalar '+'){ @$filelog[$site_index]=substr ($line, 4, -1); $site_index=$site_index+1; }else{ @$filelog[$site_index]=(substr ($line, 4, -1))+4; $site_index=$site_index+1 }

Should be:

if ( $ort_log->[ $site_index ] eq '+'){ $filelog->[ $site_index ] = substr $line, 4, -1; $site_index++; }else{ $filelog->[ $site_index ] = substr( $line, 4, -1 ) + 4; $site_index++; }