From bee7fd4cecc5a5809a2c6ed519437374b8167133 Mon Sep 17 00:00:00 2001 From: drbaggy Date: Sat, 19 Jun 2021 20:34:14 +0100 Subject: tidied up layout --- challenge-117/james-smith/perl/ch-2.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/challenge-117/james-smith/perl/ch-2.pl b/challenge-117/james-smith/perl/ch-2.pl index f2ee1b08ad..d68f4d9c9b 100644 --- a/challenge-117/james-smith/perl/ch-2.pl +++ b/challenge-117/james-smith/perl/ch-2.pl @@ -88,10 +88,7 @@ sub triangle { ## string AND add "H"s to move us to the right hand corner.. my($size,$offset,$route) = @_; - unless($size) { - say $route.( 'H' x $offset ); - return; - } + (say $route.( 'H' x $offset )) && return unless $size; triangle( $size - 1, $offset + 1, $route.'L' ); triangle( $size - 1, $offset, $route.'R' ); triangle( $size, $offset - 1, $route.'H' ) if $offset; -- cgit