The short answer would be something like this:
#!/bin/perl -w use strict; print "<html><head><title>Table</title></head>\n"; print qq{<body><table border="1">\n}; while( <DATA>) { print '<tr><td>'; print join '</td><td>', split /\|/; print "</td></tr>"; } print '</table></body></html>'; __DATA__ row 1 | 1 | 2 row 2 | 1 | 2 row 3 | 1 | 2
But if you want to write anything serious you should look at DBI, DBD::RAM or DBD::CSV and CGI.
In reply to Re: Converting Text Files
by mirod
in thread Converting Text Files
by Confused
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |