nerdexam
CompTIA

LX0-102 · Question #162

LX0-102 Question #162: Real Exam Question with Answer & Explanation

Sign in or unlock LX0-102 to reveal the answer and full explanation for question #162. The question stem and answer options stay visible for context.

Question

The following excerpt is from a Perl script that reads a LDAP database and writes a LDIF file: $ldap =Net::LDAP->new( 'ldap.server.com' ); $mesg = $ldap->bind( 'cn=incadmin,o=inc', password => 'secret'); [YOUR ANSWER GOES HERE] Net::LDAP::LDIF->new( *STDOUT,"w" )- >write( $mesg->entries ); $mesg=$ldap->unbind; Which code snippet contains the correct query?

Options

  • A$mesg = $ldap->search(base => 'o=inc',);
  • B$mesg = $ldap->search( base => 'cn=incadmin,o=inc', scope => 'one', filter => '(objectclass=*)' );
  • C$mesg = $ldap->search( base => 'o=inc', scope => 'sub', filter => '(objectclass=*)');
  • D$mesg = $ldap->search( base => 'o=inc', recursive => 'yes', filter => '(*)' );

Unlock LX0-102 to see the answer

You've previewed enough free LX0-102 questions. Unlock LX0-102 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full LX0-102 Practice