summaryrefslogtreecommitdiff
path: root/012/ch2.pl
diff options
context:
space:
mode:
authorGuillermo Ramos2019-06-14 12:46:40 +0200
committerGuillermo Ramos2019-06-14 12:47:41 +0200
commit1fe6307f2d4a49ab0cb97b2a912d9a57a9a3d9a3 (patch)
tree6cad17fb2495185d40bf2264d916f481f104d101 /012/ch2.pl
parent89aaa58e0df44a6a731411d6bf025e9cf1855a4c (diff)
downloadperlweekly-1fe6307f2d4a49ab0cb97b2a912d9a57a9a3d9a3.tar.gz
[012#2] Usage
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";
+}