open(TEMPLATE, "mypage.htmlt") or die "can't open mypage.htmlt: $!"; local($/) = undef; my $template = ; close(TEMPLATE); $template =~ s/\$TITLE/$title/g; print "Content-type: text/html\n\n"; print $template;