Paul Harwood wrote:
> What would be the best method to parse the following DN? I just want
> the first part of this DN so I can create a server list into an array
> (EX-MSG-01, EXMSG-02 etc). I've tried using SPLIT but I am not sure
> how to get the first part of the text I want. Any help appreciated.
> 
> CN=EX-MSG-01,CN=Servers,CN=foreignlocation,CN=Administrative
> Groups,CN=domain,CN=Microsoft
> Exchange,CN=Services,CN=Configuration,DC=company,DC=domain,DC=com
> --Paul

        If you only care for what comes after the first CN, then you could
do something like:

        my $Myfile ;
        if ( /^CN=([^,]+)/ ) { # collect into $1 everything up to the next
,(in this case EX-MSG-01)
           $Myfile = $1;
       }else {
         # no hit, so do what is necessary here
       }

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to