in reply to Re: How to convert a text file to a HTML file
in thread How to convert a text file to a HTML file
#!/usr/bin/perl use strict; use warnings; open my $HTML, '>', 'output.html' or die $!; print $HTML <<'_END_HEADER_'; <html> <head><title></title></head> <body> <pre> _END_HEADER_ open my $IN, '<', 'input.txt' or die $!; print $HTML while <$IN>; print $HTML '</pre></body></html>'; close $HTML or die $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to convert a text file to a HTML file
by ghosh123 (Monk) on Jan 25, 2013 at 12:43 UTC | |
by RichardK (Parson) on Jan 25, 2013 at 13:14 UTC | |
by marto (Cardinal) on Jan 25, 2013 at 12:51 UTC | |
by ghosh123 (Monk) on Jan 25, 2013 at 13:04 UTC | |
by marto (Cardinal) on Jan 25, 2013 at 13:18 UTC |