in reply to Splitting an LDAP DN into its constiuent parts (groups)
Checking http://search.cpan.org/dist/perl-ldap/MANIFEST for dn i find
http://cpansearch.perl.org/src/GBARR/perl-ldap-0.4001/t/01canon_dn.t and I see canonical_dn, which looks useful, so I grep for it,
http://search.cpan.org/grep?cpanid=GBARR&release=perl-ldap-0.4001&string=canonical_dn&i=1&n=1&C=0 and I see ldap_explode_dn, and that is what you want,
In Section
Seekers of Perl Wisdom