aboutsummaryrefslogtreecommitdiff
path: root/challenge-117/james-smith
diff options
context:
space:
mode:
authordrbaggy <js5@sanger.ac.uk>2021-06-19 20:34:14 +0100
committerdrbaggy <js5@sanger.ac.uk>2021-06-19 20:34:14 +0100
commitbee7fd4cecc5a5809a2c6ed519437374b8167133 (patch)
treebed17d6f5e915940e11ca47ed3f6e838a579b5c3 /challenge-117/james-smith
parentfc5f34f9c17bbcf562635d656a0803692f6e2bdf (diff)
downloadperlweeklychallenge-club-bee7fd4cecc5a5809a2c6ed519437374b8167133.tar.gz
perlweeklychallenge-club-bee7fd4cecc5a5809a2c6ed519437374b8167133.tar.bz2
perlweeklychallenge-club-bee7fd4cecc5a5809a2c6ed519437374b8167133.zip
tidied up layout
Diffstat (limited to 'challenge-117/james-smith')
-rw-r--r--challenge-117/james-smith/perl/ch-2.pl5
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;