From 81ddb6bcbab9f8d4b7535a42fae1cfcc05f15eac Mon Sep 17 00:00:00 2001 From: hjp Date: Tue, 8 May 2012 10:05:02 +0000 Subject: [PATCH] Add option --suffix --- lspath/lspath.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lspath/lspath.pl b/lspath/lspath.pl index f1cab7d..679b911 100755 --- a/lspath/lspath.pl +++ b/lspath/lspath.pl @@ -1,6 +1,15 @@ -#!@@@perl@@@ -w +#!@@@perl@@@ +use warnings; use strict; +use Getopt::Long; + +my $suffix = ""; + +GetOptions( + "suffix:s" => \$suffix, +); + my @pp; for my $p (@ARGV) { @@ -9,6 +18,7 @@ for my $p (@ARGV) { for (my $i = 0; $i < scalar(@p); $i++) { my $pp = join("/", @p[0..$i]); $pp = "/" if $pp eq ""; + $pp .= $suffix; push (@pp, $pp); }