Craig Sharp wrote:
> I need to put a counter in a script that processes a file line by line.
> I want the counter to alway stays on the same line on the console but
> increment. This is to be a baby sitter so that the user can see the
> numbers increase. I do not want to scroll but print the num
This is pulled from a script I have that loops through over 500,000 database
records, correlates data and does a bunch of other junk. It shows a progress
bar, the percentage, and an estimated "time left" deallie. It's actually
quite a cool tool.
use Term::ProgressBar;
$max = $maxcount; # Max
$counter = 0;
print STDOUT "Processing product line files: ";
PLFKEY: for $file_name_key (keys %patch_files)
{
$counter++;
print STDOUT "\b"x5;
print STDOUT $counter," "x(5 - (length($counter)));
.
.
.
Thank you,
Patrick Sullivan
-Original Message---