in reply to Re: Re: Which loop should I use?
in thread Which loop should I use?

I'd really recommend using something more standard. For example:
for my $cnt ($start .. $end) { # ... }
There's no need to have an independent $cnt when you can use that name as the looping variable.

Also, what's wrong with that output? Maybe you could check that the page is loading properly, for example, by testing defined($content) && length($content)