There has been other good replies already, so I'll leave it with that. Except there is (at least) one thing that everyone seem to have overlooked.
The $ct variable is increased for every hit, or more interestingly, for each time @files is increased. So that can be replaced by
HTH,$ct -= @files; while (my $line = <F>) { ... } # Old code without $ct $ct += @files;
In reply to Re: Shorten script
by ihb
in thread Shorten script
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |