in reply to Difficulty Mapping Data

If you combine the ID and alias for each combination in file 1; eg:

%hash1 = { "bobjones-www.foo.com" => 1, "bobjones-www.bar.com" => 1, "bobjones-www.dj.com" => 1, };

Then by combining the ID and aliases from file 2 in a similar way, you can do a direct lookup to determine if the same pairing exists in file 1, as you've just read from file two.

What that won't tell you is if the alias exists in file 1 under a different ID.

If the latter is (also) a requirement--it's unclear from your spec--then instead, key the hash constructed from file 1 by the alias, with the ID as the value:

%hash1 = { www.foo.com => 'bobjones', www.bar.com => 'bobjones', www.dj.com => 'bobjones', };

Or if it is possible and legal for a single alias to appear under two (or more) IDs in file one, a secondary hash.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy