Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my %hash1 = {a=>192.168.0.1,b=>192.168.0.1,c=>192.168.2.2,d=>192.168.2.3,e=>192.168.3.4,f=>192.168.3.4};

I have perl hash like given above. keys are device names and values are ip addresses.How do i create hash with no duplicate ip addresses (like %hash2) using %hash1(devices that have same ips are omitted.)?

my %hash2 = {c=>192.168.2.2,d=>192.168.2.3};
Posted
Updated 29-Oct-13 22:23pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900