I have two arrays that are associated. The first has what would be a "key" in a hash, the second has the "value". There are multiple instances of each "key" in the array, and the value associated with each key can be either yes, or no. A quick example:
@1 = ('NET1020, NET0190, NET1020, NET0230,
NET1020, NET1639, NET0820, NET1639');
@2 = ('yes, yes, no, no,
yes, no, yes, no');
Notice that there are both yes and no values associated with the "key" NET1020.
I need to use @1 to 1st look for duplicates and remove them from both arrays, and if one of the values is no in @2, then that needs to be the value for the "key" in @1. If not, then the value can be yes. Basically what I need to end up with is:
%1-2 = (
"NET1020" => "No",
"NET0190" => "Yes",
"NET0230" => "No",
"NET1639" => "No",
"NET0820" => "Yes",
);
I hope I have been clear enough in my explanation. I am a perl novice and am at a loss as to where to even start.
Thanks for you help.