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 reply to Re: ARGV Problem by tjdmlhw
in thread ARGV Problem by tjdmlhw

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.