in reply to Perl Code in HTML

One quick & dirty solution is to position an <iframe> in your html file to call your program.

<iframe src="path_to_your_program" scrolling="no" width="20" height="10" frameborder="0" marginheight="0" marginwidth="0" />

Then add this to your program to print your variable to the iframe.

print "content-type: text/html\n\n"; print $variable;