Skip to content

Instantly share code, notes, and snippets.

@satomixx
Created February 6, 2014 07:23
Show Gist options
  • Save satomixx/8839670 to your computer and use it in GitHub Desktop.
Save satomixx/8839670 to your computer and use it in GitHub Desktop.
Perlで2つの配列の要素から重複を排除する、重複した要素だけ抽出する ref: http://qiita.com/mugyuu/items/f5d825c5214a7848305a
hoge# perl make_array_unique .pl
6
2
8
4
10
@unique = grep { $count{$_} >= 2 } keys %count; # 要素数が2より小さいもののみ抽出
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment