3

Ive just gotten a new computer at work and Im trying to get perl up and running on it. I have a problem with Perl not reading command line input when I execute the script.

I use Win7 and if I call the script from the command line like this:

myscript.pl 1 2 3

It does not receive the supplied 1 2 3, but if I call it like this:

perl myscript.pl 1 2 3

It does.

This first example worked for me before and all of the scripts that we use at work calls perl scripts like that.

assoc .pl 

gives me

.pl=Perl

and ftype perl

gives me

perl=C:\Perl64\Bin\perl.exe "%1" %*

Any ideas?

1
  • Prior to this, did you work on Linux? Commented Sep 6, 2012 at 5:58

2 Answers 2

2

You can try to remove the following registry key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pl

It should "reset" the wrong behaviour and make it honour the run settings you have configured.

Sign up to request clarification or add additional context in comments.

3 Comments

Sorry for my slow reply i fix it using another method but your method just helped a colleague :).
@LinusBrandett how did you fix it? This solution didn't help me.
Removing HKEY_CLASSES_ROOT\.pl solved the problem for me
0

Faced the same problem after "installing" Strawberry Perl portable.

Solution that worked for me:

HKEY_CLASSES_ROOT\Applications\perl.exe\shell\open\command (Default) REG_SZ "C:\Perl\perl\bin\perl.exe" %1 %*

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.