why cmd can not catch @ARGV?

L

lsyx

I use Active Perl on Windows and had set the %PATHEXT%=%PATHEXT
%;.PL;
When I use the script a.pl on cmd.exe,
"perl a.pl xxx" can work correctly.
"a xxx" can not catch @ARGV.
I don't know how to config it?
thanks very much.
-----------CMD---------
E:\tmp>perl a.pl xxx
a.pl start
xxx
a.pl end

E:\tmp>a.pl xxx
a.pl start

a.pl end

E:\tmp>a xxx
a.pl start

a.pl end
-----------CMD---------
 
J

Jürgen Exner

lsyx said:
I use Active Perl on Windows and had set the %PATHEXT%=%PATHEXT
%;.PL;
When I use the script a.pl on cmd.exe,
"perl a.pl xxx" can work correctly.
"a xxx" can not catch @ARGV.
I don't know how to config it?

Let me paraphrase to make sure I understand your problem correctly.

When calling a Perl program using
perl a.pl xxx
then the parameter xxx is passed to the program correctly.
However when calling like
a.pl xxx
or like
a xxx
then the parameter xxx is no passed to the program.

The reason is a broken setting for the "Open" action for files of type
PL. The line for "Application used to perfom action" must end with
%*
in order for all the parameters to be passed from cmd to perl.

jue
 
L

lsyx

thanks a lot.
I fixed it In the Windows Explorer->Tools > Folder Options > File
Types tab > PL file type > advanced ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top