summaryrefslogtreecommitdiff
path: root/012/ch2.pl
diff options
context:
space:
mode:
authorGuillermo Ramos2019-07-01 13:53:37 +0200
committerGuillermo Ramos2019-07-01 13:53:37 +0200
commitd916ca90c354b29cc1b0953508e9601576a4fd1e (patch)
treef1997d85fb0736cfb0abdf4cb534f81df8220df3 /012/ch2.pl
parent85d335507fbb74df316bd5831e621e1a37884c35 (diff)
downloadperlweekly-d916ca90c354b29cc1b0953508e9601576a4fd1e.tar.gz
[all] Formatting, missing comments in header, etc
Diffstat (limited to '012/ch2.pl')
-rwxr-xr-x012/ch2.pl13
1 files changed, 13 insertions, 0 deletions
diff --git a/012/ch2.pl b/012/ch2.pl
index ffd870c..3162569 100755
--- a/012/ch2.pl
+++ b/012/ch2.pl
@@ -1,4 +1,17 @@
#!/usr/bin/env perl
+#
+# Write a script that finds the common directory path, given a collection of
+# paths and directory separator. For example, if the following paths are
+# supplied
+#
+# /a/b/c/d
+# /a/b/cd
+# /a/b/cc
+# /a/b/c/d/e
+#
+# and the path separator is /. Your script should return /a/b as common
+# directory path.
+################################################################################
use strict;
use warnings;