On Sat, Nov 29, 2008 at 11:32, John J. Foster
<[EMAIL PROTECTED]> wrote:
> Hi again,
>
> Is it possible to modify the following script to return a list of
> available fields? I'm trying to query my address at fastmail.fm and
> would like to display as much info as possible.
snip

Replace

        if ($entry->get_value('mail')) {
                print($entry->get_value('mail'),"\t",
                      decode("UTF-8", $entry->get_value('cn')),"\tFrom Exchange 
LDAP
database\n");
                }
        }

with

        print map { "$_\n" } $entry->attributes;

You can find the documentation here:
http://search.cpan.org/dist/perl-ldap/
http://search.cpan.org/dist/perl-ldap/lib/Net/LDAP.pod
http://search.cpan.org/~gbarr/perl-ldap-0.39/lib/Net/LDAP/Message.pod
http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP/Search.pod
http://search.cpan.org/dist/perl-ldap/lib/Net/LDAP/Entry.pod


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to