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.
In reply to Re^3: Problems passing command line parameters to activestate perl on XP
by BrowserUk
in thread Problems passing command line parameters to activestate perl on XP
by redss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |