Code below is based on the guess that that OP is trying to create a static file ...and, at that, perhaps only on a non-server box:
#!usr/bin/perl -w use strict; use vars qw($out); $out = "test060718.htm"; open( OUTPUT, ">", "$out") or die "Can't open $out \n"; # Send content-type -- NOT needed if sending to a file # print "content-type: text/html \n\n"; # OUTPUT Header Section # print OUTPUT "<html>\n"; print OUTPUT "<head>\n"; print OUTPUT "<title>Created By Perl</title>\n"; #\title fixed to /title as per [explorer] 's node, below print OUTPUT "</head>\n"; # HTML Body # print OUTPUT "<body>\n"; print OUTPUT "foo\n<h1>bar</h1>\n</body></html>\n";
produces:
<html> <head> <title>Created By Perl</title> </head> <body> foo <h1>bar</h1> </body></html>
In reply to Re^2: Create html file from script
by ww
in thread Create html file from script
by dtharby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |