>assoc .pl .pl=Perl >ftype Perl Perl="E:\Perl\bin\perl.exe" "%1" %*
This (path to perl.exe according to your machine) would assure you, that your Perl is properly installed.
You should be able to call perl scripts just by name.
You can can even go further and:
>set pathext PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH >set PATHEXT=%PATHEXT%;.PL
With that you are able to call you perl script just by name, even without the .pl extension (provided no other file with same basename and other executable extension is found before your script is concidered).
You can make the environment change permanent by editing PATHEXT in start>settings>system>advanced>environment
Under these circumstances
>echo print "@ARGV" >targ.pl >targ 1 2 3 1 2 3 >perl -e "system 'targ', 1, 2" 1 2
But, I've seen that misbehaviour (script name triggers execution, but @ARGV is not available) reported a few times in the past (for W2K and XP). Heck, I even had once such a machine (NT4) years ago at work, but did not know enough then about perl and Windows command execution to solve the mystery.
In all these cases a call of perl with the script (and its parameters) as argument was processed correctly.
I will sleep better, once someone is able to explain what causes this (and I can read it somewhere posted) ;-)
And Celada++ for the post right on spot wrt Shebang parsing.
In reply to Re: ARGV Problem
by pKai
in thread ARGV Problem
by tjdmlhw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |