I am creating a web site where I want to have the same menu on each page.
I created a "menu file", and put the html print statements in the file. The menu file contains html code:
<table>
<tr>
<td>
<a href=get_plans_summary.pl?Invoice=$FORM{Invoice}</a>
</td>
</tr>
</table>
Inside of my perl script, I print out each line from the file, including a value for the variable $FORM{Invoice} (which I am getting from a previous link):
$FORM{Invoice} = "2007_08";
$top_menu = "top_menu.txt";
open(line, "$top_menu") || die ("\nERROR - could not open file: $filename\n");
while (<line>)
{
print "$_\n";
}
My problem is that it prints the following:
<a href=get_plans_summary.pl?Invoice=$FORM{Invoice}</a>
and it doesn't translate the variable $FORM{Invoice} to the value that I have set for it earlier.
If I don't have it print from the file, then it works - so I know that the value is being retrieved from the previous html page.
How do I tell it to print from the file and at the same time, translate the value of $FORM{Invoice}?
Thanks