I have spent a good part of today trying to figure out a very simple situation
where there are nested for loops. Normally, I have not had problems, but,
for some reason, with this tertiary level loop, Perl decides it just doesn't
exist. My abridged code is below. What am I doing wrong, please? I can't
see it.
The strangest part of this whole dilemma is that I can test the variable for
their content just before calling the last two 'for' loops, seeing that their
values are as expected, but then the innermost for loop fails.
code below
foreach $i (1..scalar(@question)) {
if ($question_type[$i] eq columnar_chart) {
@names=split (/\|/, $question_answers[$i]);
$columns=scalar(@names);
$these_rows=$question_values[$i];
print qq~
abridged for emailing
~;
$column_width=sprintf(%.1d,100/$columns);
foreach $k (0..($columns)-1) {
print qq~
td align=center width=$column_width%font face=Arial
size=2 color=#33$names[$k]/font/td
~;
}
foreach $fg (0..($these_rows)-1) {
print We get to the outer loopbr;
print tr;
my $inner_counter=1;
foreach $rt (0..($columns)-1) {
print We get to the inner loopbr;
$columnar_chart_value=value_.$i._.$inner_counter._.$counter;
print qq~
td width=$column_width\%p align=centerinput
type=text size=15 name=$columnar_chart_value/td
~;
$inner_counter++;
}
print /tr;
}
}
}
}
code above
Thanks in advance.
Brad Smith
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs