@x = qw(1 4); @y = qw(1 2 3); push @z, (grep { $_ == \@y } @x) ? 'y' : 'n'; print $z[0]; print $z[1];