for ( my $row = 0; $row < 10; $row++ ) { my $search = qr/$sheettwo->{Cells}[$row][0]->{Val}/; my $data = $sheetone->{Cells}[$row][0]->{Val}; if ( $data =~ m/$search/ ) { printf( "Column A Row %d matches\n", ( $row + 1 ) ); } }