day08.pl (376B) - raw
1 #!/usr/local/bin/perl 2 # day 2015-08 3 4 use strict; 5 use warnings; 6 use v5.32; 7 use lib '.'; 8 use Day08 qw< part1 part2 >; 9 10 @ARGV = "input" unless @ARGV; 11 chomp( my $input = do { local $/; <> } ); 12 13 my @strings = split /\n/, $input; 14 my ( $part1, $part2 ); 15 16 foreach ( @strings ) { 17 $part1 += part1( $_ ); 18 $part2 += part2( $_ ); 19 } 20 21 say "part 1: ", $part1; 22 say "part 2: ", $part2;