[lug] perl and cgi.pm
Michael J. Hammel
mjhammel at graphics-muse.org
Thu Feb 7 07:44:41 MST 2002
I'm trying to add a checkbox group to a CGI.pm script. I need to give the
values for each checkbox inside a loop. According to Lincoln Stein's
book on CGI.pm, the function checkbox_group() will return an array of
elements (in an array context) that I can manipulate in my loop (which
actually builds a table). My question is I don't know what elements I'm
getting back or how to manipulate them.
For example, I'd like to do this:
@buttons = checkbox_group(...);
$index=0;
while(...)
{
push @row,
Tr(
td( $buttons[$index++]({-value=>"$something"}) ),
td( ... )
);
}
The syntax here is wrong, I know. So how do I access the elements created
by the call to checkbox_group and update/set the value for a given
checkbox?
--
Michael J. Hammel The Graphics Muse
mjhammel at graphics-muse.org http://www.graphics-muse.com
------------------------------------------------------------------------------
The most powerful force in the universe is gossip. -- Unknown.
More information about the LUG
mailing list