open (STAT, "<", "$file") while ( $content = ) { : $errcnt = $total - $content; } : printf RPT " Number of Rejected Records : $errcnt\n";