in reply to Perl modulus not working
You need to invert the condition of your test. Ie:
unless( $cnt % 100 ) { print "$cnt\n"; } [download]
If you do not understand why that works, think about it for a while. Try tracing it out on a piece of paper.