In the following code, is there some way to reference the current object in the second segment from the third segment?
`$a = "one", "two", "three"`
`$a | % {$_ -replace "t","x" } | % { $_ }`
To explain a little differently, I’d love to be able to use something like | % { "$_.$_ : $_" } in the third pipeline segment to get this output:
one: one
two: xwo
three: xhree
This is the only solution I have found so far. Is there some better alternative?
output: