Hey, I'm trying to create an HTML table of the powers of 2,3, and 4. It seems to be working. The only problem is that the html_table() subroutine is printing out both calls that i made to it ($table1, and $table2), instead of just one ($table2). Thanks, Kiko #!/perl/bin/perl print "Content-type: text/html\r\n\r\n"; # generate an HTML table of the powers of 2,3 and 4 $rows[0] = html_row("white"," n " , "nth power of 2", "nth power of 3", "nth power of 4"); for ($i=0;$i<10;$i++) { if ($i % 2) { $rows[$i+1] = html_row("#cccccc",$i,2**$i,3**$i,4**$i); } else { $rows[$i+1] = html_row("#ccccff",$i,2**$i,3**$i,4**$i); } } $table = html_table(1,"",@rows); $table2 = html_table(0,"black",html_row("",$table)); print "Here are the powers of 2, 3 and 4

\n"; print "$table2"; # This subroutine will print out a table row sub html_row { local($color, @row)=@_; $rowP.=""; foreach $a (@row) { $rowP.=" $a "; } $rowP.="\n"; return ($rowP); } # This subroutine will print out an HTML Table sub html_table { local($border,$color,@table_row)=@_; $tableP.="\n"; foreach $b (@table_row) { $tableP.="$b"; } $tableP.="
\n"; return ($tableP); }