标签:
直接上代码
my @array = ( ‘a‘, ‘b‘, ‘c‘, ‘a‘, ‘d‘, 1, 2, 5, 1, 5 ); my %count; my @uniq_times = grep { ++$count{ $_ } < 2; } @array;
Perl数组去除重复元素
原文地址:http://www.cnblogs.com/CodeTracker/p/4834618.html