Thanks David but you're assuming I know more Perl than I do.  I read your reply 
and honestly do not know what you said.  I'm a Perl beginner--that's why I 
chose the beginners list.  I've read the books about hashes, etc., but I was 
thinking this was just an array search.  Maybe I'm being too simplistic.
 


"Wagner, David --- Senior Programmer Analyst --- WGO" <[EMAIL PROTECTED]> wrote:
david cateron wrote:
> I have put information in two arrays as follows:
> 
> Element(0) - File Name
> Element(1) - Field Name
> 
> Both arrays are set up this way. I'd like to search through both
> arrays and if the File name is the same in both (there will be about
> 10 different file names--file names in the first array should also be
> in the second array) and the field name is the same in both, ignore
> it. But if the file name is the same in both and there's a
> difference in the field name, like a field name that is not there,
> I'd like to output that difference. 
> 
> So the first file might look like this:
> 
> FileA A
> FileA B
> FileA C
> FileB A
> FileB B
> FileC a
> 
> And the second file like this:
> FileA B
> FileA C
> FileB A
> FileB a
> FileC a
> 
> How can I do this taking into account the fact that I'm matching
> array elements[0] in each file before checking to see if both files
> contain the same fields? Essentially I'm looking for any missing
> fields between files. 
> 
I believe you are working too hard. I have take the tables and indexes from a 
MVS environment. One from Prod and QA and load a hash using anonymous arrays. 
elemment 0 holds the number of columns and the columns become the indexes for 
the rest of the array. Now I can compare and see where the differences are.

For yours, use two hashes and the first field as the key into the hash. Then 
how you want to handle the fields can be a number of ways.

A start.
Wags ;)
> Thanks,
> dave
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



*******************************************************
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.
*******************************************************


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
  • RE: Search through two... david cateron

Reply via email to