From bc9239b4ec00e915ec0d460f86272ebefd89670a Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Tue, 6 Dec 2022 07:58:33 +0100 Subject: [PATCH] Day 6: rewrite after misreading the task --- 2022/12a.pl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 2022/12a.pl diff --git a/2022/12a.pl b/2022/12a.pl new file mode 100755 index 0000000..52d31de --- /dev/null +++ b/2022/12a.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl -w + +use v5.36; +use strict; +use experimental 'multidimensional'; + +chomp($_ = <>); +my $i; +s/^.//, $i++ while substr($_, 0, 14) =~ /(.).*\1/; +say $i + 14; + -- 2.43.0