1 [[!meta title="Using Term::Progressbar"]]
3 I've been working for a while on analyzing a fairly large dataset for
4 my Lupus genetics project. One of the major annoyances with analyzing
5 large datasets is not knowing when a particular part of the analysis
6 is going to finish, and whether I should go back and rewrite part of
7 the code to be faster, or just wait for it to finish. In R, I've been
8 using txtProgressBar to handle this, but I hadn't bothered to find a
9 similar module for perl until now.
12 [Term::ProgressBar](http://search.cpan.org/dist/Term-ProgressBar/)
13 exists, and is pretty easy to use:
15 my $pos = $sfh->tell();
16 $sfh->seek(0,SEEK_END);
17 my $p = Term::ProgressBar->new({count => $sfh->tell,
20 $sfh->seek($pos,SEEK_SET);
23 $p->update($sfh->tell());
26 producing useful output, which told me that my SQLite database
27 creation routine would take about 2 days to finish instead of the 7
28 years that the slightly less optimal version wanted.