in reply to while, foreach inside CGI.pm table
I think this should work for you:
print table(Tr([ td( join "<br>\n", map { a({href => $urlhash{$_}}, $_) } keys %urlhash ) ])); [download]