# prepare query to insert set my $sth = $dbh->prepare('INSERT INTO myset (col) VALUES (?)'); # build set to insert my $set = join ',', $cgi->param('Name'); # insert set $sth->execute($set);