Hi all,
hopefully someone can help me with this, I will describe my problem as best
as I can. I am opening 2 files, one has a list of NT account names, The 2nd
has a list of NT account names & e-mail addresses. I am trying to match an
NT account name from the first list to an e-mail address in the second file
by NT account name. 
My comments are to explain what my bumbling logic is, can someone tell me
how I might try and pull the e-mail address from the @emaildata ?

--------------script starts
-----------------------------------------------------
open (LIST1, "<input.txt");
open (MAILLIST, "<nt-smtp.txt");
@maillist=<MAILLIST>;
while(<LIST1>) 

{
        # Split the name from the .txt extension eg. conorl
        @data = split(/\./, $_);                

        # read the name
        $Name=$data[0];                 

        # print the name so we know what is happening
        printf "$Name\n";               

        # Grep the name from the second file, outputting result to @data1
        @data1=grep /$Name/i, @maillist;        

        # print the @data1 so we know wheat is happening again
        printf "DATA1 @data1";          

        # split @data1, to isolate the e-mail address from the name eg.
[EMAIL PROTECTED]
        @emaildata = split(/,/, @data1);                

        # print the e-mail address, NOT. This prints an integer, I am not
sure why. HELP this where it goes pear-shaped.
        printf "emaildata is @emaildata[0]";    
}
----------script
ends------------------------------------------------------------
sample input.txt data
conorl.txt

sample nt-smtp.txt data
conorl,[EMAIL PROTECTED]




The information in this email is confidential and may be legally privileged. It is 
intended solely for the addressee. Access to this email by anyone else is 
unauthorised.if you are not the intended recipient, any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance on it is 
prohibited and may be unlawful. Please note that any views, opinions or advice 
contained in this email are those of the sending individual and not necessarily those 
of the firm. It is possible for data transmitted by e-mail to be deliberately or 
accidentally corrupted or intercepted. For this reason, where the communication is by 
e-mail, J&E Davy does not accept any responsibility for any breach of confidence which 
may arise from the use of this medium. If you have received this e-mail in error 
please notify us immediately at mailto:[EMAIL PROTECTED] and delete this e-mail from 
your system.


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

Reply via email to