Perl 64bit on Windows 7 – ARGV problem

Friday I rebuilt my work machine to Windows 7 64bit in preparation for the 8 gig of RAM headed my way (thanks boss!).  I also installed the most recent release of Activestate Perl 64bit.  Upon getting back down to business I discovered that none of my scripts were successfully receiving command line arguments.  If I prefaced the running of the script with perl.exe (eg: c:\perl54\bin\perl.exe e:\scripts\myscript.pl argument1 argument2) it worked fine.  Turns out this is a simple registry fix.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\pl_auto_file\shell\open\command]
@=”\”C:\\Perl64\\bin\\perl.exe\” \”%1\” %*”

Is all you need.  Dump that into a text doc and change it to a .reg file.  Double click it and let it insert into your registry and you’re good to go.  For some reason the Perl installer sets the variable acceptance (that’s this bit you see above: “%1″ %*) correctly for the file extension .pl, but misses it on the required pl_auto_file.

Silly.

Comments are closed.