diff options
| -rw-r--r-- | challenge-117/james-smith/perl/ch-2.pl | 5 |
1 files changed, 1 insertions, 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; |
