foreach $ray(@cellr) { if($ray eq $worksheet->{Cells}[$row][1]->{Val} ) { print "$ray :yes\n"; } else { next; } }