From 1fe6307f2d4a49ab0cb97b2a912d9a57a9a3d9a3 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Fri, 14 Jun 2019 12:46:40 +0200 Subject: [012#2] Usage --- 012/ch2.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"; +} -- cgit v1.2.3