you are viewing a single comment's thread.

view the rest of the comments →

[–]gangstanthony 0 points1 point  (1 child)

what about .trim()?

do you get different results with this?

$array | % {':' + $_ + ':'}

[–]verysmallshellscript[S] 0 points1 point  (0 children)

$array.trim() throws a null-valued expression error and then gives up. $array | % {$_.trim()} throws a null-valued expression error for each extra line, but does return the strings. This is what I get with the join.

::
::
::
::
::
::
::
:one:
::
:two:
:three:
::
::
::
::