change: use CGI; to: use CGI qw/:standard *table/; change the first: print table ({-border => 0}, to print start_table ({-border => 0}, change in the loop: print table ({-border => 0}, Tr ({-align=>"center", -valign=>"TOP", -style=>"font-family: verda to: print Tr ({-align=>"center", -valign=>"TOP", -style=>"font-family: verda and add: print end_table(), after the loop.