adventofcode/2015/05/nice.pl

11 lines
168 B
Perl
Raw Normal View History

2017-12-04 15:46:31 +00:00
use 5.20.0;
use List::AllUtils qw/ sum /;
say sum map { nice() }<>;
sub nice {
return 0 if /ab|cd|pq|xy/ or not /(.)\1/;
my @x = /([aeiou])/g;
@x >= 3;
}