From 7104bcff280dafd9dce7551e2ed7d7468b943003 Mon Sep 17 00:00:00 2001 From: Abigail Date: Wed, 10 Feb 2021 18:43:41 +0100 Subject: Layout --- challenge-099/abigail/perl/ch-1a.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/challenge-099/abigail/perl/ch-1a.pl b/challenge-099/abigail/perl/ch-1a.pl index c0ff48366e..3e35ee4ee9 100644 --- a/challenge-099/abigail/perl/ch-1a.pl +++ b/challenge-099/abigail/perl/ch-1a.pl @@ -55,6 +55,7 @@ sub matches ($string, $pattern) { # # If we have exhausted the pattern, we have a match # if, and only if, we have exhausted the string. + # return length ($string) ? 0 : 1; } if (!length $string) { @@ -62,6 +63,7 @@ sub matches ($string, $pattern) { # If we have exhausted the string, then if the pattern # starts with '*', we consume the '*' and recurse. # Else, the match fails. + # return $first_pattern eq '*' ? matches ($string, substr ($pattern, 1)) : 0; } -- cgit