$LDAP = ldap://sspdir.managed.entrust.com/ou=Entrust Managed Services SSP CA,ou=Certification Authorities,o=Entrust,c=US?cACertificate;binary,crossCertificatePair;binary
I am trying to extract 2 strings from this code ldap directory. The first i want:
$LDAP_host = sspdir.managed.entrust.com
and second...
$LDAP_base = ou=Entrust Managed Services SSP CA,ou=Certification Authorities,o=Entrust,c=US
My code is below, it produces constant mismatches in my output and I cannot figure out why:
my $LDAP_host = $LDAP;
my $LDAP_base = $LDAP;
$LDAP_host =~ s|^ldap:\/\/(.*)\/|$1|i;
$LDAP_base =~ s|"\/"(.*)\?|$1|i;