The title says it all. I’ve never programmed in Perl. I hacked some existing scripts, but never tried this oldie. But as it is a great language for text processing, it was time to start learning it. Maybe it will come handy some time in the future.
My repo is at https://github.com/sixhat/adventofcode.com/tree/main/2024/
(or… things I’m learning along the way)
unless
is interesting, but I have to get my head around it. But it works.use strict;
and use warnings;
are your friendmy @local_var = @_
.Use of uninitialized value
warnings reveals some undef
entries in an array (for example in my @matches
). Trick to check them out is to print join(', ', @matches)
to double check.