The following code works as expected:
'John' | % { "$_ $_" }
> John John
However, I couldn't work out a way of storing the string $_ $_
in a variable, which is later used in the pipeline:
$f = '$_ $_'
'John' | % { $f }
> $_ $_
How would I "interpolate" a variable, instead of using double quoted string?