On Wed, Dec 20, 2000 at 03:36:48PM -0800, Peter Scott wrote:
> Should this second paragraph still be true for Perl 6? I have at times
> wanted to do something of the form
>
> perl -lwe '$x = "x"; $y = "y"; $y =~ ($x eq "x" ? s/y/z/ : s/y/a/); print $y'
>
> but I have not wanted to make the right argument an expression to be
> interpreted as a search pattern (since I have qr//).
I presume that you don't find
perl -lwe '$x = "x"; $y = "y"; $x eq "x" ? $y =~ s/y/z/ : $y =~ s/y/a/; print $y'
does what you need because you actually want to do something a lot more
complex than simple "$y =~" in your expression.
Or do I guess wrong?
Nicholas Clark