Your guess about a table is spot on.....
my $err = join "\n", map { "Error $_<br>" } 0..100; my @errs = split /<br>\s*/, $err; $err = qq!<table width="100%">\n!; for ( my $i=0; $i<@errs; $i+=3 ) { $err .= sprintf "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n", map { defined $_ ? $_ : '' } @errs[$i..$i+2]; } $err .= "</table>\n"; print $err;
You could save yourself the split by simply pushing the errors into the @errs array in the first place.
cheers
tachyon
In reply to Re: Separating by threes
by tachyon
in thread Separating by threes
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |