my $sth5 = $dbh->prepare("SELECT round, teamname, score from trees where sport = ‘$sport’ and year = ‘$year’, ORDER BY round DESC") || die "Can't prepare SQL get data statement"; $sth5->execute || die “can’t execute sql statement”; ##need to get all the data one row at a time from the table. my @row; $rowcount = 0; while (@row = $sth5->fetchrow_array) { $round = $row[0]; $teamname = $row[1];## need to put each row into list_ $Score = $row[2];## of_lists a variable at a time push (@{list_of_teamdata[$rowcount]}, qw($round $teamname $score); $rowcount++; } This creates a list of structure round teamname score round teamname score round teamname score round teamname score etc i then need to substitute values from the list into the html document my $compsize = $#list2+1; If ($compSize = 7); Print “Content-Type: text/html\n\n”; Print “\n” Print “\n” Print “ tree7\n” Print “\n” Print “\n” Print “\n” Print “\n” Print “\n” Print “\n” Print “\n” Print “\n” Print “\n” is this correct. i realise this is not the best way but i'm very new to perl and cgi programming.
   $list_of_teamdata [6][1]$list_of_teamdata [6][2]