Problem in connection

2007-07-25 Thread Muhammad Azam Akram
Hi I am trying to connect with ldap directory I am usig windows. When i write these lines to connect with the server, i got error mentioned below the code. my $ldap = Net::LDAP->new($server) || die("Could not connect...\n"); my $bindmsg = $ldap->bind(); if ($bindmsg->code){ print

Re: Problem in connection

2007-07-25 Thread Emen Zhao
Modify this line my $ldap = Net::LDAP->new($server) || die("Could not connect...\n"); to my $ldap = Net::LDAP->new($server) or die("Could not connect...\n"); should solve the problem. Hope this helps! --Emen On 7/25/07, Muhammad Azam Akram <[EMAIL PROTECTED]> wrote: Hi I am trying to con

Re: Problem in connection

2007-07-25 Thread Emen Zhao
I'm sorry, you are right, || is not the issue here. I think you could use " die "$@"; " instead to see what error it throws out. That might give out more info on what is going wrong. On 7/25/07, Emen Zhao <[EMAIL PROTECTED]> wrote: Modify this line my $ldap = Net::LDAP->new($server) || die("C