in reply to dividing a hash by sets of $num

for the paging part you may also take a look at Data::Page and Data::Pageset.

cheers,