#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my %hash = ( a => [ '1','2', ], b => [ '2','3', ], c => [ '1','2', ], ); my $testing_now = 'a'; for (keys %hash) { next if ($testing_now eq $_); if ($hash{$testing_now} ~~ $hash{$_}) { print "$testing_now is duplicate of $_\n"; } #This is an update! Forgot this next line in initial post $testing_now = $_ } # Returns a is duplicate of c c is duplicate of a (.02 version)