# Used for progress indicator select STDERR; $| = 1; ... # Progress indicator, final value $progress = ($count / $total_count) * 100; printf "Progress: %4.1f\%\r",$progress; # Set carriage returns back to normal after progress indicator is complete select STDOUT; print "\n"; $| = 0;