Thanks! That worked.

On Fri, 31 Oct 2003 11:43:52 -0700
"Wiggins d Anconia" <[EMAIL PROTECTED]> wrote:

> 
> 
> > 
> > 
> > > 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");
> > }
> > 
> 
> Sorry, to be specific its an argument to the 'param' method, I usually
> call 'params' so I was thinking hash. Regardless, the underlying
> reasoning is the same....
> 
> http://danconia.org
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to