- or download this
my %label = (
one => 'foo',
two => 'bar',
three => 'baz',
);
- or download this
print checkbox_group(
-name => 'checkbox',
-values => [keys %label],
-labels => \%label,
);
- or download this
# create an array whose keys all have values 'no'
my %checkbox = map { $_ => 'no' } keys %label;
# update each found key's value to 'yes'
$checkbox{$_} = 'yes' for param('checkbox');
- or download this
#!/usr/bin/perl -T
...
map Tr(td[$_,$checkbox{$_}]), keys %checkbox
);
}