Elapsed Time: 0:20 min:sec, ########..........................20.0% #### min This is the min value of the items that will follow (used to calculate estimated finish time) max This is the max value of all items in the even (also used to calculate estimated finish time) #### use strict ; use warnings ; use File::Find ; use Logfile::Rotate ; use Time::Progress ; $| = 1 ; ###-- autoflush to get \r working --### my $timer = new Time::Progress ; $timer->attr( min => 0, max => 100 ); $timer->restart; print "\n"; for my $incr ( 0 .. 20 ) { ###-- print progress bar and % done --### print $timer->report( "Elapsed Time: %L min:sec, %40b %p\r", $incr ) ; sleep 1 ; } ### MAIN CODE HERE ### logroll ; ### END OF MAIN CODE ### ###-- stop timer --### $timer->stop ; ###-- report times --### print $timer->elapsed_str ;