http://qs321.pair.com?node_id=411282

helmex has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am trying to find a way to check if a user exists in specific Originization Unit. I cannot use a typical if statement on my list of users:


$path='cn=username,ou=mybase_ou,dc=computer,dc=com'; if (my $objUser = Win32::OLE->GetObject("LDAP://" . $path)){ }



Because the program will die as soon as I reach a username that does not exists, because the bind fails. Any help or suggestions would be much appreciated
%^+^%