According to the MailChimp API, it should be easy to update a subscribers groups/interests, but that's not been my experience. In my code below, the subscriber is not added to the Group with groupid1, but is removed from the Group with groupid2. Why wasn't the subscriber added to Group groupid1? Makes no sense.
my %groups = (
'GroupID1' => true,
'GroupID2' => false
);
$email_address = lc('member_email');
$subscriber_hash = md5_hex( $email_address );
my $response = $mailchimp->update_member (
list_id => 'listid',
subscriber_hash => $subscriber_hash,
interests => \%groups
);