jose_m has asked for the wisdom of the Perl Monks concerning the following question:
Hello Folks, i need to query ldapsearch and to see if ldap is running on a group of hosts. i an trying to use Net::LDAP then running $ldap. i am missing something. anyone feel like lending a hand
#!/usr/bin/perl use Net::LDAP; @hosts =qw[ host1 host2 host3]; sub Check { foreach (@hosts) { $ldap = Net::LDAP->new( "$_" ) or die "$@"; } }
ok for good measure here would be the linux command line for what i am trying to automate.
ldapsearch -x -H ldaps://host1.com | wc -l
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ldapsearch in perl
by ravi6289 (Initiate) on Jan 08, 2013 at 04:36 UTC | |
by jose_m (Acolyte) on Jan 08, 2013 at 15:04 UTC | |
by jose_m (Acolyte) on Jan 09, 2013 at 15:28 UTC | |
|
Re: ldapsearch in perl
by linuxer (Curate) on Jan 07, 2013 at 23:36 UTC |