diff options
Diffstat (limited to '012/ch2.pl')
-rwxr-xr-x | 012/ch2.pl | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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"; +} |