- or download this
@ECHO OFF
SetLocal EnableDelayedExpansion
...
)
call perl getargs.pl %ARGS%
- or download this
unshift(@ARGV,$0);
for my $n (0..$#ARGV) { print "$n:$ARGV[$n]:\n" }
- or download this
C:\>parseargs.bat "abc "" def" bob
0:getargs.pl:
1:"abc "" def":
2:bob:
- or download this
unshift(@ARGV,$0);
@ARGV = map {s/^"(.*)"$/$1/ ? s/""/"/g && $_ : $_ } @ARGV;
for my $n (0..$#ARGV) { print "$n:$ARGV[$n]:\n" }
- or download this
0:getargs.pl:
1:abc " def:
2:bob: