my $level = 0; s{<h(\d)>}{my $r = ""; if ($level < $1) {$r .= "<table>"} if ($level > $1) {$r .= "</table>"} $level = $1; "$r<tr><td>"}eg; s{\n}{</td></tr>\n}g; $_ .= "</table>" while $level--;
In reply to Re: convert text to HTML Format Table.
by Anonymous Monk
in thread convert text to HTML Format Table.
by perlsen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |