for (1..100) { tqdm; # same as tqdm($_); ... } #### for my $outer (1..10) { my $tqdm = ProgressBar->new(); # or another constructor for (1..100) { &$tqdm; ... } }