# these represent what we will use to track the information my $record_cnt = 0; my $GCOUNT = 0; my $initcnt = 0; # counts the records in the file.... sub get_record_count{ my $file = shift @_; open(FILE,$file)|| die"Cannot open $file\n$!\n"; print "Counting records........\n\n"; while(){ $initcnt++; } close(FILE); } # end get_record_count sub count_record{ $record_cnt++; $GCOUNT++; if($record_cnt == 100){ $record_cnt = 0; my $status = (($GCOUNT/$initcnt)*100); printf("\r %.2f\% Complete ",$status); } } # end count_record