On 8/12/03 5:04 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > Could anyone tell me if there is a way to perform a sorted of entries > returned from a search in Net::LDAP? If yes, how would I do this?
Yes. The Net::LDAP::Search class has a sorted() method that may do what you want. It only does a crude lexical sort, so you'll need to do some more work if you want to sort values in different languages and contexts correctly. $res = $ldap->search(...); die "Search failed", $res->error_name, "\n" if $res->code; # sort by sn first, then modifyTimestamp. my (@sorted) = $res->sorted('sn','modifyTimestamp'); Cheers, Chris