or download this
my $userFilter = "(SeatLocation=*)";
my &userAttributes = [ 'SeatLocation', 'uid' ];
...
my $searchMesg = $ldap->search (base => $userBase, filter => $userFilt
+er, scope => $scope, attrs => $userAttributes);
my @entries = $searchMesg->entries;
my $totalFound=@entries; # determine the number of entries found