http://www.perlmonks.org?node_id=1015335


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

Meh, why do any work ;)
#!/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 $!;
print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."