/p5-advent-of-code-2020

Perl 🐫 solutions for Advent of Code 2020

Primary LanguagePerlThe UnlicenseUnlicense

Advent of Code 2020 in Perl 🐫

Title is self-explanatory, right? For more info, see https://adventofcode.com/2020.

WARNING: This is a noob's attempt at Perl, like it's literally my first time using Perl in my life. Feel free to burn it to the ground with destructive comments but do let me know what Perl tricks I can use to improve some of the solutions.

Quickstart

Run each day this way (in Linux systems with Perl installed):

# Sub `XX` with 0-padded day number and `Y` with day number not 0-padded.
./day-XX/dayY.pl < ./day-XX/input

Outputs are displayed on different lines as

Part 1: ############
Part 2: ############

About the files

All the .pl files are the code. Capisce? But also, you will see files like input, test, or aux. Here's what they mean:

  • input are actual inputs that I got from AoC. These are meant to be passed into the Perl scripts as standard in and will produce outputs.
  • test* are example inputs that will work with the scripts without any modification of the script.
  • aux (or any other names) are other inputs that will require some changes in the code to run properly. What are those changes? 🙈

Day-by-day explanations.

Work in progress. Watch this space.