I need
some help here. I execute the below code and when it attempts to bind, the
program dies and only has an output when I do an END. The output is Bad
File Descriptor.
Can anyone
see anything that I am missing?
Any help
would be appreciated.
Here is
what I am doing...
#######################
use strict;
use Net::LDAP;
use Net::LDAP;
########## Setup Variables
##########
# Home directory
my ($home) = Win32::GetCwd();
my ($home) = Win32::GetCwd();
# LDAP Variables
my ($ldap,$ldapBase);
my ($ldapServer) = 'ldap.site.name.com';
my ($ldapId) = 'cn=credentials,dc=com';
my ($ldapPw) = 'password';
my ($ldapPort) = 389;
my ($ldapTimeout) = 30;
my ($ldap,$ldapBase);
my ($ldapServer) = 'ldap.site.name.com';
my ($ldapId) = 'cn=credentials,dc=com';
my ($ldapPw) = 'password';
my ($ldapPort) = 389;
my ($ldapTimeout) = 30;
########## Perform LDAP Search
##########
# Open the connection to the ldap
server
$ldap = Net::LDAP->new($ldapServer,port=>$ldapPort,timeout=>$ldapTimeout) || die("Couldnt connect"); ## It always successfully connects.
$ldap = Net::LDAP->new($ldapServer,port=>$ldapPort,timeout=>$ldapTimeout) || die("Couldnt connect"); ## It always successfully connects.
####### Here is the problem piece. I've tried connecting from an
array of credentials to anonymous and the program simply
dies.
# Bind with the search
credentials
$ldap->bind (dn=>$ldapId,password=>$ldapPw);
$ldap->bind (dn=>$ldapId,password=>$ldapPw);
***
~~~code cut out~~~
***
exit
(0);
######################################
END
{
print "$!\n";
}
**********************************************************************
This email and any files transmitted with it are confidential
and intended solely for the individual or entity to
whom they are addressed. If you have received this email
in error destroy it immediately.
**********************************************************************
Wal-Mart Stores, Inc. Confidential
**********************************************************************
