Keep It Simple, Stupid | |
PerlMonks |
Re: ARGV Problemby tjdmlhw (Acolyte) |
on Jan 10, 2006 at 16:32 UTC ( [id://522228]=note: print w/replies, xml ) | Need Help?? |
This morning I added C:\perl\bin to PATH and tried 'perl ARGVtst.pl LHW_TST'. It worked as designed, but I still wanted to know why 2000 would let me enter the command without the perl, but XP wouldn't.
I started searching the web again and found some threads in another site that addressed this problem. It seems that this is an old problem that has been migrating from on windows version to the next. The first threads from 1998 were about Win 98 having the problem. The next set addressed Win 98 working, but NT having the problem. Then there were problems where NT worked but 2000 had a problem. Finally, there was a thread where XP Prof failed, but XP Home was fine. In this thread there was an attachment that offered a solution to the problem. The author said the problem was in the registry key 'HKEY_CLASSES_ROOT\Perl\shell\Open\command'. The value of this key should be '"C:\Perl\bin\perl.exe" "%1" %*', but the '%*' was being left off. I could not find HKEY_CLASSES_ROOT in my registry, so I searched for perl.exe. I found a Perl\shell\Open\command under a different path and sure enough the '%*' was missing. I added the %* and the command now works as designed when entering 'ARGVtst.pl LHW_TST'. Thanks to all of you who had input into this problem. I would like to give credit to the author of the attachment on the other web page, but I don't know the rules about mentioning someone else name or giving the name of a different site.
In Section
Seekers of Perl Wisdom
|
|