use strict; use warnings; use Array::Compare; my @anc=("BX1.01.001","BX1.01.002","BX1.01.003","BX1.01.004","BX1.01.005","BX1.01.006"); my @ind=("BX1.01.002","BX1.01.002","BX1.01.003","BX1.01.004","BX1.01.005","BX1.01.006"); my $comp = Array::Compare->new(); if (!($comp->compare_len(\@anc, \@ind))){ print "Indicator and anchor count do not match"; exit; } if ($comp->compare(\@anc, \@ind)){ print "Same Array OK"; }else{ print "Different Array OK"; }