Add option --suffix

This commit is contained in:
hjp 2012-05-08 10:05:02 +00:00
parent 03ebbfe2ec
commit 81ddb6bcba
1 changed files with 11 additions and 1 deletions

View File

@ -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);
}