1 #!perl 2 use strict; 3 use warnings; 4 use Net::LDAP; 5 use Authen::SASL; 6 7 my $l = Net::LDAP->new( 'ldap.example.com', onerror=>'die', ); 8 my $sasl = Authen::SASL->new(mechanism=>'GSSAPI'); 9 $l->bind( sasl=>$sasl ); 10 11 print "OK\n";