summaryrefslogtreecommitdiff
path: root/012/ch2.pl
diff options
context:
space:
mode:
Diffstat (limited to '012/ch2.pl')
-rwxr-xr-x012/ch2.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/012/ch2.pl b/012/ch2.pl
index 6c12861..ffd870c 100755
--- a/012/ch2.pl
+++ b/012/ch2.pl
@@ -32,4 +32,9 @@ sub commonPath {
: join "/", @common;
}
-print commonPath(@ARGV), "\n";
+# CLI usage
+if (@ARGV) {
+ print commonPath(@ARGV), "\n";
+} else {
+ print "Usage: $0 path1 path2 ...\n";
+}