Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Doing something like this is bad practice, for a variety of
reasons. Mostly because if someone adds a form field that
you did not prepare for, it might affect a different part
of the script. For example, if someone added a form field
called "key" your script would die because it would try to
set $key to the form value, which is also the
loop iterator.
If you want to avoid calling $query->param() each and every time you want to access the form values, and I sympathize, you should try something like this:
...et cetera. See the CGI.pm manpage for more info about the Vars syntax. HTH'kaboo In reply to (CGI::Vars) Re: Variable Variables
by mwp
|
|