tags:

views:

50

answers:

1

What is the Powershell equivalent to Perl's qw() function? In v2 I can write my own with -split, but I'm assuming that there's an exiting method that I just can't find in the documentation.

+2  A: 

We include this functionality in the PowerShell Community Extensions e.g.:

PS> quote-list hello world
hello
world
PS> ql hello world  # using alias
hello
world

If you don't want to install PSCX, the function is trivial:

Set-Alias ql Quote-List
function Quote-List {$args}
Keith Hill
I was hoping for an function in the box, but I'll take this to mean that there isn't one. Thank you.
fatcat1111
Nope, not out of the box but all things considered, it's pretty easy to add to your profile.
Keith Hill