Here is one way to do it:
#!/usr/bin/perl -w use strict; #my $cnt; my $step = 100; for (1..10000) { #print "$_..." unless (++$cnt % $step); print "$_..." unless ($_ % $step); } print "\n";
Update: The counter in that code is redundant, so I've edited it. Thanks, [id://fishbot_v2] :)
-- DarrenIn reply to Re: printing a running count
by McDarren
in thread printing a running count
by phaedo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |