aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbaggy <js5@sanger.ac.uk>2021-05-11 10:05:37 +0100
committerdrbaggy <js5@sanger.ac.uk>2021-05-11 10:05:37 +0100
commit9a1447f08c3e59c9834369a8755b29d30c0f598c (patch)
tree0a47d3e9b5adb7d9e57cd0b231e5d130d3e61c22
parentc103e8bdc1eebeb40e87a11b6cd24197f96d1035 (diff)
downloadperlweeklychallenge-club-9a1447f08c3e59c9834369a8755b29d30c0f598c.tar.gz
perlweeklychallenge-club-9a1447f08c3e59c9834369a8755b29d30c0f598c.tar.bz2
perlweeklychallenge-club-9a1447f08c3e59c9834369a8755b29d30c0f598c.zip
tidied into 3-liner (init, code, return) + compacted compact function
-rw-r--r--challenge-112/james-smith/perl/ch-1.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-112/james-smith/perl/ch-1.pl b/challenge-112/james-smith/perl/ch-1.pl
index c6248e80da..3246323b99 100644
--- a/challenge-112/james-smith/perl/ch-1.pl
+++ b/challenge-112/james-smith/perl/ch-1.pl
@@ -66,6 +66,6 @@ sub canonical_path {
sub canonical_path_compact {
$a=1,@_=grep{!/^\.?$/}split/\//,shift;
$_[$a]ne'..'?$a++:$a?splice@_,--$a,2:shift while$a<@_;
-'/'.join'/',@_;
+'/'.join'/',@_
}