use Net::LDAP; $ldap = Net::LDAP->new('ip address') or die("Could not get to server"); # bind to a directory with dn and password $mesg = $ldap->bind( 'user dn', password => 'password' );