in reply to CGI problem: trying to assign parameters in a loop

While I agree with gav^ for the most part I also think that some people maybe forced to work with old code or maybe only need a simple (famous last words) "one time" solution. The example code given is not readable and makes too many calls to the system. It is difficult to "read" because the "'s have to be escaped and it has to make a lot of system calls because of the duplicated print commands.
So I would rewrite the loop to look like this:
foreach (@inventory) { print qq~ <TR> <TD>$_</TD> <TD>$inv_prices{$_}</TD> <TD>$inv_weights{$_}</TD> <TD><input type="text" size="4" name="quantity$_" ></TD> </TR> ~; }