Since you are working on
LDAP data, you might want to consider using one of
the LDAP modules, such as
DBD::LDAP.
This module adds a database-independent SQL layer
to an LDAP database. It provides an alternative
to dealing with your data as comma-separated values.
It should work perfectly the first time! - toma