#!/usr/local/bin/perl # day 2022-12 use strict; use warnings; use v5.32; use lib '.'; use Day12 qw( define_matrix define_graph find_path ); @ARGV = "input" unless @ARGV; chomp( my $input = do { local $/; <> } ); my $matrix = define_matrix( $input ); my ( $neighbors, $elevation ) = define_graph( $matrix ); my $part_1 = find_path( $neighbors, $elevation ); say $part_1;