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.
In reply to Re: Perl modulus not working
by BrowserUk
in thread Perl modulus not working
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |