Jan Dubois wrote:
>On Sun, 23 Sep 2007, Suresh Govindachar wrote:
>>
>> In the cmd.exe shell, I can run a .pl file by typing its name.
>>
>> However, in the new PowerShell,
>>
>> http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx
>>
>> I need to prefix the .pl file with perl. How can one get the
>> file association to work in the PowerShell?
>
> I don't really know, but one thing to try is adding the .pl extension to
PATHEXT:
>
> set PATHEXT=.pl;%PATHEXT%
Right idea -- had to jump through hoops to implement it.
Feels like writing VBA code!
get-childitem -path env:pathext # for copy-paste in next command
set-item -path env:pathext -value
".pl;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.PSC1"
(They have taken the pleasant activity of working at a console and
made it miserable drudgery. In cmd.exe, I had to be careful to use
unix find rather than cmd.exe's find. In the power-shell, I am
finding that more unix commands are over-ridden, for example, diff;
I think I'll just prefix all my unix-utility commands with u: ufind,
ugrep etc.)
Thanks,
--Suresh
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs