X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=eg%2Fsimple_use.pl;fp=eg%2Fsimple_use.pl;h=0000000000000000000000000000000000000000;hb=79c7be60fdd8511aa3fcfaf2e0777e4933e0d24e;hp=6d5774786bb11306acf6c0181605b3742e72cb74;hpb=1d57993ad6c38499ac417560bd18d20a689dd366;p=term-progressbar.git diff --git a/eg/simple_use.pl b/eg/simple_use.pl deleted file mode 100644 index 6d57747..0000000 --- a/eg/simple_use.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; - -use Term::ProgressBar 2.00; - -use constant MAX => 100_000; - -my $progress = Term::ProgressBar->new(MAX); - -for (0..MAX) { - my $is_power = 0; - for(my $i = 0; 2**$i <= $_; $i++) { - $is_power = 1 - if 2**$i == $_; - } - - if ( $is_power ) { - $progress->update($_); - } -}