Ok. Some more details.

I have a line in the HTML file that looks like this:
 Quote:

<td>$reference <a href='http://www.somewhere.com'>some text here</a> $address</td>

As you see there are two variables in this line but each line can contain an undefined number of variables. My script reads this file line by line and checks if the $ can be found in the line. If it is found it needs to replace the variable with the actual value, check if there is another $ in the line (hence the loop), replace it, etc.... and write the line to the new file when all variables are replaced. If no variable can be found write the line to the new file immediately and continue to the next line.

I tried doubling up on the $ in the scrip and in the file all without success. There must be something because I had it running a month ago before they stole my laptop.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.