I've been working for a while on analyzing a fairly large dataset for my Lupus genetics project. One of the major annoyances with analyzing large datasets is not knowing when a particular part of the analysis is going to finish, and whether I should go back and rewrite part of the code to be faster, or just wait for it to finish. In R, I've been using txtProgressBar to handle this, but I hadn't bothered to find a similar module for perl until now.

Luckily, Term::ProgressBar exists, and is pretty easy to use:

my $pos = $sfh->tell();
my $p = Term::ProgressBar->new({count => $sfh->tell,
                                remove => 1,
                                ETA => 'linear'});
while (<$sfh>) {
    ...; # yada yada yada

producing useful output, which told me that my SQLite database creation routine would take about 2 days to finish instead of the 7 years that the slightly less optimal version wanted.