Actually I've got a login, but sometimes I refrain because monks will get annoyed at how many times I post a question...lol. Anyway, please tell me where you get lost in my post so I can get better at writing these situations.
Now, let me explain in detail what's happening.
@data is read from a file containg many rows such as:
1,comp1,type1
2,comp2,type2
3,comp3,type3
@data2 is read from a file containing many rows such as:
1,comp1,type1,doc1,ref1
2,comp2,type2,doc2,ref2
3,comp3,type3,doc3,ref3
4,comp4,type4,doc4,ref4
5,comp5,type5,doc5,ref5
Using this code:
{
my %data;
undef @data{@data};
foreach ( @data2 ) {
print "This $_ was not found.\n"
if not exists $data{$_}
}
}
it matches all five values from each line in @data2 to all 3 values in @data line by line. So basically every line in @data2 gets printed when that script is run. What I want to do is match the first value from @data2 to the first value from @data and return the results based on values in @data2 that are not in @data.
I also want to know how I can match the second value from @data2 to the first value in @data and return the results that are not in @data.
I hope this makes better senses. I'll keep trying if it doesn't. Thanks for all your help.