aoc-2015/jour08/jour8.pl

21 lines
334 B
Perl
Raw Normal View History

2021-06-04 10:34:27 +02:00
use strict;
use warnings;
my $file = 'input';
my $total = 0;
my $tmp;
open(FH, '<:encoding(UTF-8)', $file) or die $!;
print "Traitement de la première partie…\n";
while (<FH>) {
$tmp = eval $_;
chomp($_);
chomp($tmp);
$total = $total + length($_) - length($tmp);
}
close(FH);
print "Le total est : $total.\n";