Next | Trivial Utilities | 34 |
Now the main loop:
for (;;) { $change = 0; my $time = time; foreach $item (@fhs) { my ($fn, $fh, $fl, $fs, $fl1) = @$item; $b = 0; seek $fh, 0, 1; while (<$fh>) { if ($opt_l) { $b++ if /\n\z/; } else { $b += length; } } $fl += $b;
We'll see what $fs and $fl1 are about shortly
$opt_l tells the program to count lines instead of bytes
Next | Menu | Copyright © 2012 M. J. Dominus |