http://www.perlmonks.org?node_id=664274


in reply to Mutiple values for a single ke in hashes

if @ar_1 is a list of users, why not call it @users? That will make it much easier later.

Similarly for @ar_2 -> @cities.

Your @ar_2 consists of a reference to a hash with keys of city names, and values of other city names? That seems unlikely to me. What is the real data you have, and what structures have you got it in?

Your question is horribly unclear, and stinks of homework.
  • Comment on Re: Mutiple values for a single ke in hashes