$ldap = Net::LDAPS->new(HOST,port => PORT,timeout => TIMEOUT) or die "Can't connect to LDAP server " . HOST; $ldap->bind(DN, password => PASSWORD, version => 3); open(S, "subnet.log"); while (){ chomp $_; my $results = timeit( 1, q{my $base = $_; my $look= $ldap->search(base => $base, filter =>('objectClass=dNIPIPAddressConfiguration'), attrs => ["cn"])} ); print "$_:" . timestr($results) . "\n"; }