Hello ,
I have run into a problem while writing @arrays to a subroutine. I am concantenating the result from the subroutine words() to four different tables.
The first 2 lines return the correct results without any problem the second 2 lines produce an endless loop.
######################################
#######################################
The loop that is getting stuck is where the HTML for the tables is concantenated and later returned. I had added 3 print statements in the loop and the print statement that keeps looping is "we are in MAIN loop".
Thanks You for any help
Cal
#######################################
#######################################
In the begining
Let us first assume that there was nothing to begin with.
I have run into a problem while writing @arrays to a subroutine. I am concantenating the result from the subroutine words() to four different tables.
The first 2 lines return the correct results without any problem the second 2 lines produce an endless loop.
######################################
Code:
$table_one .= words(\@data_one);
$table_two .= words(\@data_two);
Code:
#$table_three .= words(\@data_three);
#$table_four .= words(\@data_four);
#######################################
The loop that is getting stuck is where the HTML for the tables is concantenated and later returned. I had added 3 print statements in the loop and the print statement that keeps looping is "we are in MAIN loop".
Thanks You for any help
Cal
#######################################
Code:
while ($count < $elements) {
Code:
print ("we are in MAIN loop\n");
Code:
while ($tr++ < $cols) {
$test .= "<tr>";print ("we are in TR loop\n");
my $tc=0;
while ($tc++ < $rows) {
$test .= "<td width='25%' align='left'>".(@{$ref}[$count])."</td>"."\n";print ("we are in tc loop\n");$count++
} # MAIN loop
} $test .= "</tr>"; # tr loop
} # td loop
$test .= "</tr>";
} else {#do something else}
In the begining
Let us first assume that there was nothing to begin with.