in reply to Perl modulus not working

You need to invert the condition of your test. Ie:

unless( $cnt % 100 ) { print "$cnt\n"; }

If you do not understand why that works, think about it for a while. Try tracing it out on a piece of paper.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.