You might use the following to make sure you have an appropriate number of things in @lines:while (@lines) { $output .= "<TR>"; for ( 1 .. 3 ) { $output .= "<TD>" . (shift @lines) . "</TD>"; } $output .= "</TR>"; }
my $fill = scalar @lines % 3; while ($fill-- > 0) { push @lines, " "; }
In reply to Re: Output
by chromatic
in thread Output
by Lloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |