From dcb9a699f65ea3d7663152c29bd64b8a6cf6ac0d Mon Sep 17 00:00:00 2001 From: Niels van Dijke Date: Mon, 29 Sep 2025 10:44:54 +0000 Subject: Task 2 - Small performance change --- challenge-341/perlboy1967/perl/ch2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-341/perlboy1967/perl/ch2.pl b/challenge-341/perlboy1967/perl/ch2.pl index 6869404cf3..f3dbfcc126 100755 --- a/challenge-341/perlboy1967/perl/ch2.pl +++ b/challenge-341/perlboy1967/perl/ch2.pl @@ -20,7 +20,7 @@ use Test2::V0 qw(-no_srand); use exact 'v5.32', -signatures; sub reversePrefix ($str,$char) { - $str = $char.reverse ($1).$2 if ($str =~ m#^(.*?)$char(.*)#); + return reverse($1).$2 if ($str =~ m#^(.+?$char)(.*)#); return $str; } -- cgit