Years ago, I had code that did that and then I got a version of Net::LDAP
that sent null attributes across the wire. Even back then OpenLDAP was
upset by such behavior. I quickly updated my code to check if (in your
case) @eduPersonAffiliation had zero entries and issue a proper
$entry->delete('eduPersonAffiliation') call in that case. I've not had
any issues since. Perhaps, your Net::LDAP module version has changed and
it is sending what is being logged across the wire instead of the delete
you are expecting.