Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- print <<EOF;
- <html>
- <head>
- <style>
- TABLE{
- border-collapse:collapse;
- }
- TD{
- border:1px solid black;
- padding:3px;
- text-align:left;
- }
- </style>
- </head>
- <body>
- <table>
- EOF
- while(<>){
- chomp;
- print "<tr>";
- my @a=split(/s+/);
- print "<td>$_</td>" foreach (@a);
- print "</tr>n";
- }
- print "</table></body></html>n";
- $ perl csv2html.pl input.csv > output.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement