From 63870977489f600abb9ea1a95da6579dfbdeb7c0 Mon Sep 17 00:00:00 2001 From: E7-87-83 Date: Tue, 18 May 2021 22:19:33 +0800 Subject: elsif --- challenge-113/cheok-yin-fung/perl/ch-2.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/challenge-113/cheok-yin-fung/perl/ch-2.pl b/challenge-113/cheok-yin-fung/perl/ch-2.pl index 786996c7d2..d371237f53 100644 --- a/challenge-113/cheok-yin-fung/perl/ch-2.pl +++ b/challenge-113/cheok-yin-fung/perl/ch-2.pl @@ -43,8 +43,8 @@ sub consistency { return 0; } } - else { - return 0 if $t[$ind] ne 'x'; + elsif ($t[$ind] ne 'x') { + return 0; } } return 1; @@ -64,8 +64,6 @@ sub print_tree { } - - sub print_pretty_tree { my @tr = @_; my $hash_tree = tree_build( \@tr, 0); -- cgit