Re: Split and extract a sub-string

2004-08-24 Thread Gunnar Hjalmarsson
Rajesh Dorairajan wrote: I've to extract a CN (Common Name) from an LDAP DN. The LDAP DN is as shown below: isuer=CN=Name,OU=People,OU=com I just need to extract the Name from the above string. Right now I've my @tmpList = split ( /=CN=/, $_ ); $issuer = $tmpList[1]; But this returns the whole stri

Split and extract a sub-string

2004-08-24 Thread Rajesh Dorairajan
Hello All, I've to extract a CN (Common Name) from an LDAP DN. The LDAP DN is as shown below: isuer=CN=Name,OU=People,OU=com I just need to extract the Name from the above string. Right now I've my @tmpList = split ( /=CN=/, $_ ); $issuer = $tmpList[1]; But this returns the whole string "Name,