My HTML reads a file and writes out field names to include a counter so I have fields like
<input type=text name=surname$counter><input type=checkbox name=update$counter>
When they click update these fields are sent to the update program for update.
If the person changes this field they will also tick the change checkbox and I want to be able to loop through all the fields and update them as below
UPDATE Program
for($counter=0 ; $counter < $totalrecords ; $counter++)
{
if ($update$counter)
{ blah blah}
The problem is that Perl does not seem to like me adding a variable ($counter) to a variable name ($update) and the only other way would be long winded like
if ($update1) {Blah Blah}
if ($update2) {Blah Blah}
How can I get a variable to be part of anothers variable name.
G