adventofcode/2020/06/part1.pm
2021-12-05 11:51:21 -05:00

22 lines
286 B
Perl

package part1;
use 5.20.0;
use warnings;
use Path::Tiny;
use List::AllUtils qw/ sum /;
use experimental qw/
signatures
postderef
/;
sub solution($input) {
return sum map {
my %x = map { $_ => $_ } /(\w)/g;
scalar keys %x;
} split "\n\n", $input;
}
1;