Has anyone been able to get Net::LDAP on winNT?
I have pasted together this script
#!/usr/bin/perl use Net::LDAP qw(:all); $ldap = Net::LDAP->new('pluto') or die "$@"; $ldap->bind; # an anonymous bind my $base = "c=us"; my @Attrs = (); my $gettem = "harnish"; $result = LDAPsearch($ldap,"sn=" . $gettem,\@Attrs); @entries = $result->entries; foreach $entr (@entries) { $phone = $entr->get_value('telephoneNumber'); $user = $entr->get_value('cn'); $email = $entr->get_value('mail'); print "$user\n"; print "$email\n"; print "$phone\n"; } undef @selected; $ldap->unbind; # take down session sub LDAPsearch { my ($ldap,$searchString,$attrs) = @_ ; my $result = $ldap->search ( base => "$base", scope => "sub", filter => "$searchString", attrs => $attrs, sizelimit => $size_limit ); }
This works fine on Linux RH7 but on winNT it errors on the "$entr->get_value" so I remove the _value and run it. On both systems it gives me this output:
ARRAY(0x1f6b378) ARRAY(0x1f6aa70) ARRAY(0x1f6ad7c)
Any Ideas? Thanks

--BigJoe

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

In reply to Net::LDAP on NT by BigJoe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.