Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: ARGV Problem

by tjdmlhw (Acolyte)
on Jan 10, 2006 at 16:32 UTC ( [id://522228]=note: print w/replies, xml ) Need Help??


in reply to ARGV Problem

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.

Replies are listed 'Best First'.
Re^2: ARGV Problem
by jahero (Pilgrim) on Aug 03, 2018 at 14:15 UTC

    This is relevant even today, in case one is using Strawberry Portable, and wants it to behave as normal perl installation. Thanks for the tip!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://522228]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-19 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found