### BEGIN code added to the paged callback sub foreach my $var (@attr_list) { if ($var =~ /;range=/) { ### $var will look like this --> "member;range=0-1499" ($var,my $range) = split /;/, $var; ($junk,$range) = split /=/, $range; my ($first,$last) = split /-/, $range; ### if $last eq "*", indicates this is the last range increment, and ### we do not need to perform another supplemental search if ($last ne "*") { my $range_diff = ($last - $first) + 1; my $increment = $last + $range_diff; $last = $last + 1; my $push_line = $var."|".$last."|".$increment."|".$sub_obj->dn; push(@supp_srch,"$push_line"); } } ### if $var matches range pattern ### END code added to the paged callback sub #### foreach my $line (@supp_srch) { chomp($line); ($att_val,$first,$last,$dn) = split /\|/, $line; $attributes = ['cn','displayName','groupType','description', "member;range=${first}-*"]; my $mesg = LDAP_PageSearch ( $ldap, "(&(objectclass=group)(!(objectclass=computer)))", $attributes , "$dn" ); }