> Hi, > I am trying to do this: > > for( $i = 0; $i < 5; $i++) { > $qty[$i] = $q->param('qty$i'); > } > I could say $q->qty0; > $q->qty1; > | > | > | > $q->qty4; > > and be done with it. That works. But I would rather do it from the loop. > Why is my variable $i not being appended to qty form variable being passed? > Any ideas? >
You are using single quotes in your hash key, which prevent variable interpolation. Switch them to double quotes and it should work. foreach my $i (0 .. 5) { $qty[$i] = $q->param("qty$i"); } http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]