adventofcode/2018/08/sol1.pl

19 lines
241 B
Perl
Raw Normal View History

2018-12-08 21:09:44 +00:00
use 5.20.0;
use warnings;
use experimental qw/
signatures
postderef
/;
2018-12-08 21:26:34 +00:00
use lib './lib';
2018-12-08 21:09:44 +00:00
2018-12-08 21:26:34 +00:00
use Entry;
2018-12-08 21:09:44 +00:00
2018-12-08 21:26:34 +00:00
use List::AllUtils qw/ sum /;
2018-12-08 21:09:44 +00:00
2018-12-08 21:26:34 +00:00
my @input = split / /, <>;
2018-12-08 21:09:44 +00:00
2018-12-08 21:26:34 +00:00
my $entry = Entry->new( stream => \@input );
2018-12-08 21:09:44 +00:00
2018-12-08 21:26:34 +00:00
say sum $entry->all_data;