2025 Advent of Code Day 6 Part 2

Perl. Developed and tested with Perl 5.40.0. use v5 .40 ; my @grid ; open DATA, q/data/ ; while ( <DATA> ){ chop ; push @grid , $_ ; } close (DATA); my $format = build_unpack_format( @grid ); @grid = (); open DATA, q/data/ ; while ( <DATA> ){ chop ; my @fields = unpack $format , $_ ; push @grid , [ @fields ]; } close (DATA); my @operations = map { m/([\+\*])/ ; $1 } @ { pop @grid }; my @columns ;…