Help for this page

Select Code to Download


  1. or download this
    my %label = (
       one   => 'foo',
       two   => 'bar',
       three => 'baz',
    );
    
  2. or download this
    print checkbox_group(
          -name   => 'checkbox',
          -values => [keys %label],
          -labels => \%label,
    );
    
  3. 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');
    
  4. or download this
    #!/usr/bin/perl -T
    
    ...
                    map Tr(td[$_,$checkbox{$_}]), keys %checkbox
            );
    }