#!/usr/local/bin/perl -w use strict; use diagnostics; $|++; my $temp = [ [ '/', '/index.html', '/products/', ], [ '/', '/index.html', ], [ '/', '/index.html', '/products/', ], [ '/', '/index.html', '/test.html', ] ]; my ( $a_ref, $h_ref ); for $a_ref ( @{ $temp } ) { $h_ref->{ $_ }++ for @{ $a_ref }; } for( keys %{ $h_ref } ) { print "$_\n" if $h_ref->{ $_ } == scalar @{ $temp }; }