In the immortal words of Quanah Gibson-Mount:
> According to the Net::LDAP documentation:
> 
> new ( HOST, OPTIONS )
> 
> HOST may also be a reference to an array of hosts, host-port pairs or URIs 
> to try. Each will be tried in order until a connection is made. Only when 
> all have failed will the result of undef be returned.
[...]
>  $ldap_url = [EMAIL PROTECTED];
>  print "LDAP URL is now $ldap_url\n";
>  $ldap=Net::LDAP->new("$ldap_url");

Should be checking that $ldap is defined here to avoid the error ;)

> LDAP URL is now ARRAY(0x1a3752c0)

And since you're passing an array referenced *interpolated into a
string*, this will fail unless your LDAP server's hostname happens to
be "ARRAY(0x1a3752c0)".

> Now, if I switch back to just a single URI, things work just fine:
> 
> LDAP URL is ldap://freelancer.lab.zimbra.com:389

Why this prints a string instead of the ARRAY(xxx) I can't figure out.

%%  Christopher A. Bongaarts  %%  [EMAIL PROTECTED]       %%
%%  Internet Services         %%  http://umn.edu/~cab  %%
%%  University of Minnesota   %%  +1 (612) 625-1809    %%

Reply via email to