The way you normally approach this is by also giving the checkboxes a value (and in that case it helps if you give them all the same name, since they are related)...
#!/usr/bin/perl -w
use CGI;
my $cgi = CGI->new;
print $cgi->header, $cgi->start_html, $cgi->start_form;
if ( my @selected = $cgi->param( 'my_checkbox' ) ) {
print "<hr>\n";
print "<p>You selected: ".join( ', ', @selected )."</p>\n";
}
print "<ul>\n";
for my $x ( 1 .. 100 ) {
print qq{<li><input type="checkbox" name="my_checkbox" value="$_">
+ $_</li>\n};
}
print "</ul>\n";
print $cgi->submit,$cgi->end_form, $cgi->end_html;
Also look at [cpan://