#!/usr/bin/perl

use Net::LDAP;

my $ldap_server = "localhost";
my $base_dn = "dc=andago,dc=com";

$ldap = Net::LDAP->new($ldap_server) or die "$@";
my $message = $ldap->bind();

$mesg = $ldap->search(base => $base_dn, filter => "(uid=*)");

$mesg->code && die $mesg->error;
foreach $entry ($mesg->entries) { $entry->dump; }

$mesg = $ldap->unbind;   									     
