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 ;