in reply to looping an array through perldap
Thanks gang!#!/usr/bin/perl5 -w use strict; use Mozilla::LDAP::Conn; use Time::HiRes qw(gettimeofday tv_interval); # measure elapsed time from open to close of each ldap connection my $t0 = [gettimeofday]; my @hosts = ('ldap0:390','ldap:389','ldap2:389'); foreach my $host (@hosts) { my $conn = new Mozilla::LDAP::Conn(split( /:/,$host)); die "connection failed" unless $conn; my $responsetime = sprintf("%d",tv_interval($t0)*1000); print "$responsetime "; } print "\\n"; print "\n";
protos
|
|---|