Perl does not see command line arguments

I am rehosting my Perl programs from Windows 7 to 8.1.  All is well except that my perl scripts do not detect any command line parameter.  Here is my assoc command

 C:\ODpair>assoc .pl

C:\ODpair>ftype Perl
Perl="C:\Perl\bin\perl.exe" "%1" %*

I appreciate any help to resolve this from you experts.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Having an ftype entry is not required and in my case Perl is not listed in ftype.

What is required is having the proper registry entry under HKEY_CLASSES_ROOT.

Open regedit and navigate to the Perl entry and inspect its layout and value for the command param.  In my case it's actually under HKEY_CLASSES_ROOT\Perl_program_file.

Here's the complete exported key from my system.
Windows Registry Editor Version 5.00

@="Perl program file"


[HKEY_CLASSES_ROOT\Perl_program_file\shell\Execute Perl Program]

[HKEY_CLASSES_ROOT\Perl_program_file\shell\Execute Perl Program\command]
@="\"C:\\strawberry\\perl\\bin\\perl.exe\" \"%1\" %*"
After checking and possibly fixing the registry entry, see if you get the same output from this test.

c:\test>perl -e "print $_,$/ for @ARGV" 1 2 3
cpeters5Author Commented:
No luck.  Attached is my regedit screen

Note: I just reinstalled version 5.18 in c:/perl64/.  No luck there either.

Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

cpeters5Author Commented:
If I run my script with perl command.  I.e.
c:>perl 123 456
Then detected @ARGV = (123,456);

This suggests the problem is the file type association...

Here is the .PL assoc again

C:\>assoc .pl

Which distro did you install, Activestate or Strawberry, or some other one?

Your print screen shows that you still have the reg entry of the first perl installation.  Did you uninstall the old perl before installing the new version?

My guess is that the reg entries of the 2 installations are conflicting with each other.  Can you expand the other reg entry and post the print screen of it?
It also appears that you have PerlScript installed, which is Microsoft's implementation (port) of perl.  That could also be conflicting with your other installation.
cpeters5Author Commented:
There were 3 versions installed.  I uninstall all three, all keys removed.  Then install fresh Perl 5.18.
After the installation, I activated ppm.  It detected only the 276 installed packages.  But this time, no error output as before.

Do you detect any problem in the attached screenshot for: regedit, ppm screen and Perl -v?

Also, do you have suggestion for a work around?  I have immediate need for a few modules such as DateTime, Location::GeoLoc, XML::Simple and some math::stuff

Everything looks good in your screenshot.

Are your scripts now able to see the command line args?  If so, then you should be fine and no "work around" would be needed.

Have you tried installing any of those modules?  If so, did they install properly or did they fail and produce error messages?
You'll want to add a few additional repositories to ppm.

Personally, I've moved away from using ppm and instead install all of my modules via cpan.  You first need to install MinGW-w64 to get the needed GCC compiler.

You might be able to install that via ppm.  At least it was available in the 32bit version.  I'm not sure if it's available in the 64bit version of ppm.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cpeters5Author Commented:
Took me a while to find the right MinGW-w64 that works.
Thanks FishMonger.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.