From f5ee0bc200f9f75654124b57c352fe5c965c122a Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 6 Aug 2019 15:39:56 +0200 Subject: [020#1] MAXIMUM TRIMMING --- 020/ch1.pl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '020') diff --git a/020/ch1.pl b/020/ch1.pl index 0240d6a..8022fb9 100755 --- a/020/ch1.pl +++ b/020/ch1.pl @@ -8,8 +8,6 @@ use strict; use warnings; -my $str = shift; - my @chunks; -push @chunks, $1 while $str =~ /((.)\2*)/g; +push @chunks, $& while $ARGV[0] =~ /(.)\1*/g; print "@chunks\n"; -- cgit v1.2.3