When modifying a global for local use (e.g. $_), localize it first.
I don't see $i declared. Is strict on?
Almost always, C-style loops are much harder to read and maintain then their Perl equivalents.
Consider using for my $i (a..b) instead of for (my $i=a; $i<=b; $i++).
If you want to hide a warn, why not just hide *that* warning. e.g. no warnings 'uninitialized';