$ct -= @files; while (my $line = ) { ... } # Old code without $ct $ct += @files;