Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i also have a syntax error problem with the qw($round $teamname $score); part. i'm trying to recreate the entire returned record set as a data structure so that i can print a competition tree with the variables from @list_of_teamdata refered to as eg.$firstrandom = $list1[rand @list1]; push @list2, $random; $count = $#list1 while ($count != 0){ ###create list2 $random = $list1[rand @list1]; $ispresent = 'false'; for $I (0..$#list2){##check to see if team is already in list2 if ($random == $list2[$I]) { $ispresent = 'true'}; }; if ($ispresent =='false') { ##if not add it to @list2 push @list2, $random; $count--; }; };
and print them where i like.$list_of_teamdata[7][1]
i'd really appreciate it if you could help@row; $rowcount = 0; while (@row = $sth5->fetchrow_array()) { $round = $row[0]; $teamname = $row[1]; ## need to put each row into the list. $Score = $row[2]; of lists a variable at a time push (${list_of_teamdata[$rowcount]}, qw($round $teamname $score); $rowcount++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(ar0n) Re: syntax issues
by ar0n (Priest) on Mar 29, 2001 at 00:57 UTC | |
by Anonymous Monk on Mar 29, 2001 at 02:15 UTC | |
|
Re: syntax issues
by gregw (Beadle) on Mar 29, 2001 at 02:45 UTC | |
|
Re: syntax issues
by Vondikall (Initiate) on Mar 29, 2001 at 16:55 UTC |