################################## use Net::LDAP; use strict; my $ldap = Net::LDAP->('host.edu', port => '389'); $ldap -> bind; my $mesg = $ldap -> search(base => "cn = administrator"); use Net::LDAP::Util qw(ldap_error_text); die ldap_error_text($mesg->code) if $mesg->code;