perlop:
>Binary ``=~'' binds a scalar expression to a pattern match. [...] The
>right argument is a search pattern, substitution, or transliteration. [...]
>
>If the right argument is an expression rather than a search pattern,
>substitution, or
>transliteration, it is interpreted as a search pattern at run time.
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//).
--
Peter Scott
Pacific Systems Design Technologies