in reply to Re: Re: hash keys, %
in thread hash keys, %
But I would suggest not even using this loop, since you never actually seem to use the stuff in @group that you splice off. You only seem to be interested in the number to print out, so you could just as easily do this:
Even if you do use this method, you should still get familiar with splice!use POSIX 'ceil'; my $url = "http://..."; my $num_pages = ceil( (keys %hash) / 20 ); print qq(<a href="$url?page=$_">$_</a><br>\n) for 1 .. $num_pages;
blokhead
|
|---|