ok, I don't know do you set the vars in the script and thus want them executed or do you just have the names stored somewhere with their value, but with this you should get on your way:
 Code:
[postprep]$rc = Open(1, "d:\oldfile.html", 2)
if @error "couldn't open the source file: " @error ? get $ endif
if exist("d:\newfile.html") del "d:\newfile.html" endif
$rc = Open(2, "d:\newfile.html", 5)
$line = ReadLine(1)
While @ERROR = 0
	If InStr($line, "$$")
		"vars on this line: " ?
		$line=Split($line,"$$")
		For $c=1 to Ubound($line)
		 $line[$c]="$$"+Trim(Split($line[$c],"<")[0])
		 $line[$c] ?
		Next
		?
		$line=join($line,"")
	Endif
	$rc = WriteLine(2, $line + @CRLF)
	$line = ReadLine(1)
Loop
"done, good night." get $
$rc = Close(1)
$rc = Close(2)
_________________________
!

download KiXnet