http://qs1969.pair.com?node_id=461478

thetallblondguy has asked for the wisdom of the Perl Monks concerning the following question:

Hello

In my perl scripts, I often generate HTML code like this :

 

#!/usr/bin/perl

.......

print <<eof ;
<HTML>
<HEAD>
<TITLE>Title</TITLE>
</HEAD>
The variable is : $variable
<BR><BR>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR><TD>
<HR color=#99ffcc SIZE=4>
<FONT face=Arial color=#99ffcc><B>
Bottom text
</B></FONT>
</TD></TR></TABLE>
</BODY>
</HTML>


eof

......

 

However, this code is not easily editable with softwares like FrontPage.

I would like to put this code in an easily editable .html file, and use an instruction in my perl script, that would insert this html file in my perl script, with the $variable, so that $variable is substituted on execution of the script. This is an example with $variable but i would like to work with any $xxx

Any suggestion ?

Thanks for your help.