#!/usr/bin/perl -w use CGI qw/ :standard /; use strict; my @checkbox_items = qw/one two three four five/; print header, start_html( -title => 'Checkbox group sample using CGI.pm' ), start_form; # The following code creates the checkbox group using the elements in # @checkbox_items print checkbox_group( -name => 'testing', -values => \@checkbox_items, -linebreak => 1, ), submit, end_form; # Here we retrieve and output the user-selected values of the checkbox group. my @checkbox_values = param( 'testing' ); print p( 'Check a button or two and click Submit Query to see the checked values.' ), li( \@checkbox_values ), end_html; print end_html;