Skip to content

Instantly share code, notes, and snippets.

@sharifulin
Created December 7, 2009 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sharifulin/250702 to your computer and use it in GitHub Desktop.
Save sharifulin/250702 to your computer and use it in GitHub Desktop.
Пересекаются ли два массива?
use common::sense;
my @a = qw(q w e r t y);
my @b = qw(u i o p q);
say 1 if grep { defined } @{{ map { $_ => 1 } @a }}{ @b };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment