$comment_sth->execute($id) or die "Couldn't execute comment query: ".$DBI::errstr; my @comment_row; my $comment_count; while (@comment_row = $comment_sth->fetchrow_array) { my ($speedtrap_id,$comment_id,$comment_text,$comment_date,$commenter) = @comment_row; $comment_count++; print < $comment_text EOF } print < There are no comments from others for this speedtrap. EOF