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
In reply to ldapsearch in perl by jose_m
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |