Next Trivial Utilities 31

ticker

     my $file = shift 
       or die "Usage: $0 filename\n";
     open my($fh), "<", $file
        or die "$file: $!\n";
     while (1) {
       while (<$fh>) {
         $size += length;
         print $size, "\r";
       }
       sleep 1;
       seek $fh, 0, 1 or die "seek: $!";
     }


Next Menu Copyright © 2012 M. J. Dominus