in reply to Outputting data to tables with CGI.pm

I agree that CGI.pm's HTML formatting is ugly when mixed in with your code, but to answer your question, you need to use map to get a list of td's to put inside the Tr.
use CGI qw/:standard/; # I prefer non-OO for these print table( Tr( [ map td( [ $_->{name}, $_->{year}, $_->{rating} ] ), @table ] ) );

Update: you probably want to pass each group of 3 td's as an array ref [ ... ], instead of a flat array (which would put them all in one Tr).. I updated the code and now each Tr has 3 td's.

blokhead