in reply to Re: Problems passing command line parameters to activestate perl on XP
in thread Problems passing command line parameters to activestate perl on XP

ftype returns the same string as yours except that the -sw is missing. How do I update that association?

Thanks!

  • Comment on Re^2: Problems passing command line parameters to activestate perl on XP

Replies are listed 'Best First'.
Re^3: Problems passing command line parameters to activestate perl on XP
by BrowserUk (Patriarch) on Jan 13, 2007 at 16:06 UTC

    The -sw is unnecessary, just my preference. I've updated the post to reflect that.

    The other possibility for it not working is that your environment variable PATHEXT is not set correctly. What do you get if you type set PATHEXT at the command line?

    It should look something like this:

    c:\test>set PATHEXT PATHEXT=.COM;.EXE;.BAT;.CMD;.pl;

    It may well have some extra entries for other languages, but the salient part is the presence of the .pl;. Without that, .pl files will not be recognised as executable files.

    To modify this permenantly, you need to set it into the global environment. This is done through the System Properties dialog (righ-click the My Computer icon on the desktop). On the Advanced tab you'll see a button labelled "Environment variables". Clicking that brings up a dialog split into two parts: 'User variables' and 'System variables'. If you scroll the 'System variables' list down until you can highlight the PATHEXT variable and then click the 'Edit' button underneath, you will then be able to add the .pl; entry.

    After that, click 'Ok' 3 times and you start a new command line window and try the commands again. It should now work.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Thanks for the suggestion... Ok, PATHEXT was indeed missing the .PL extension so I added it, started a new cmd prompt, confirmed .PL at the end, but it still doesnt accept args without prefaced by "perl".

      EDIT: further investigation tells me that PATHEXT merely enables me to omit the .pl extension at the command line.

      Any more ideas?