#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %some_data = ( jack => ['999', '111', '222', '333', '333', '444', '555', '777'], foo => [ '111', '222', '333', '444'], ); my %other_data = ( jack => ['999', '111', '222', '333', '333', '444', '555', '777'], foo => ['111', '222', '333', '444'], ); # print Dumper \%other_data; use Test::More tests => 1; is_deeply(\%other_data, \%some_data, 'data structures should be the same'); __END__ $ perl test.pl 1..1 ok 1 - data structures should be the same