http://www.perlmonks.org?node_id=11158888


in reply to problem with returning all records

Your code doesn't display this anywhere, you've not shown where you define $html or print it. You're clobbering (not appending to) $html so if you print it outside of the foreach loop it will only have one result.