or download this
my %checkboxes = (
ChkBoxName1 => 'EmailGroup1@Domain.com',
...
foreach my $checkbox_name (keys %checkboxes) {
$email_to .= "$checkboxes{$checkbox_name}, " if param($checkbox_name
+); # if the checkbox was ticked, the param call returns true, and $em
+ail_to gets the email address added.
}