summaryrefslogtreecommitdiff
path: root/012
diff options
context:
space:
mode:
Diffstat (limited to '012')
-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;