in reply to Re: How do I use CGI.pm methods in a loop
in thread How do I use CGI.pm methods in a loop

To OP -- since all you're trying to do is make certain rows a different color, then you can have the code reflect that as well, making it easier to read and maintain:
while ($dy < 32) { $table_info .= $q->Tr({ -align => 'left', ($dow == 0 || $dow == 6 ? (-color => 'yello +w') : () ), }, $q->th([$...]), ); $dy++; }
Then from here, we can go even further and use map (and use "THE DISTRIBUTIVE PROPERTY OF HTML SHORTCUTS" -- see CGI pod):
print OUTPUT $q->table({-cellpadding => 3}, $q->Tr({-align => 'left'}, [ map { $q->Td( { ($dow == 0 || $dow == 6 ? (-color => 'yellow') : ( +)) }, [ ... ] ) } 0 .. 31 ]), );