in reply to Net::LDAP on NT

Disclaimer: I'm by no means an LDAP guru, but I've read up on it.

Net::LDAP and Mozilla::LDAP both seem to store entry values in anonymous arrays. (A DN can have multiple values, like in the 'phones' field.) My documentation suggests $entr->get(), but doesn't mention that that returns the anonymous array.

In any case, I suspect something like:

($phone) = @{ $entr->get('telephoneNumber') }; ($user) = @{ $entr->get('cn') }; ($email) = @{ $entr->get('mail') };
would do more what you want. Another approach would be to add $phone = $phone->[0]; after the get() call.

Replies are listed 'Best First'.
Re: Re: Net::LDAP on NT
by BigJoe (Curate) on Dec 16, 2000 at 00:34 UTC
    YOU ARE AWESOME. It worked perfectly. Thanks

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.
    Use the source Luke.