Using PowerShell is Like Passing Hashes in Perl

At first I was excited that Microsoft had created PowerShell -- a usable command-line shell for Windows. (I always have 4 Cygwin Bash windows up on my XP PC at work, and before Cygwin got stable I ran the MKS Toolkit version of the Korn Shell.)

Once I started using Powershell, I quickly became disappointed. There wasn't anything in PowerShell that I wanted to do that did not exist in an easily-consumable form in Perl. That would have been acceptable -- if it hadn't been for how slow PowerShell was compared to Perl or Cygwin Bash. As someone whose bread'n'butter for several years has been .NET programming, I am still not sure why PowerShell is so much slower than Perl or Bash (if anyone knows, please tell me). (I don't have problems getting a sane level of performance out of .NET.)

After those experiences, I still would have tried using PowerShell but something held me back. It finally occurred to me one day -- using PowerShell is like passing hashes in Perl. The syntax is sweeter in PowerShell ( instead of blah->{"foo"}->{"bar"}) but the net effect (pun intended) and the mental process is the same -- create the hierarchy of references by name. PowerShell is just not sweet enough to lure me into using it (and yes, I am still also talking about how slow PowerShell is).

I still use PowerShell from time to time instead of cmd.exe, but until I see a compelling story as to why I should invest more time in PowerShell, I am sticking exclusively with Perl for my glue programming.


Yes, I haven't had the compelling reason to switch to PS2. P5 is sticky enough for me


Have you tried GNU CoreUtils? Would that give you the power you are looking for?

Is there a particular reason you'd rather not use cygwin?

You may have to muck about when mixing windows & native cygwin - for example if you have cyg perl AND ASPerl - but you have a well proven shell.

Leave a comment

About Mark Leighton Fisher

user-pic Perl/CPAN user since 1992.