diff options
| -rw-r--r-- | challenge-113/cheok-yin-fung/perl/ch-2.pl | 6 |
1 files 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); |
