# ldap.pl - a simple script to test ldap connection and data
use Net::LDAP;
use Data::Dumper;
my $ldap = Net::LDAP->new( 'localhost' );
my $mesg = $ldap->search(
	base => 'dc=extmail.org',
	scope => 'sub',
	filter => 'mail=*'
);

print Dumper($mesg);


syntax highlighted by Code2HTML, v. 0.9.1