T
tim
I'm reasonably new to perl (activeperl v5.6.1) and I'm having a problem with
@ARGV. I have a batch file that calls my perl script with the arguments of
"c:\temp\blah" "user" (the quotes are inherited from another program).
However the perl script thinks that this is a single argument and seems to
lose some of the quotes. Example:
perl -w incoming.pl "c:\temp\blah" "user"
produces
Arg. 0: c:\temp\blah" user
from
#!d:/perl/bin/perl.exe -w
my $num=0;
foreach (@ARGV) {
print "Arg. $num: $_\n";
$num++;
}
I would be grateful if anyone could explain why this is and if poss how to
get around it. I've looked at other post but couldn't find a solution.
thanks
@ARGV. I have a batch file that calls my perl script with the arguments of
"c:\temp\blah" "user" (the quotes are inherited from another program).
However the perl script thinks that this is a single argument and seems to
lose some of the quotes. Example:
perl -w incoming.pl "c:\temp\blah" "user"
produces
Arg. 0: c:\temp\blah" user
from
#!d:/perl/bin/perl.exe -w
my $num=0;
foreach (@ARGV) {
print "Arg. $num: $_\n";
$num++;
}
I would be grateful if anyone could explain why this is and if poss how to
get around it. I've looked at other post but couldn't find a solution.
thanks