Re: Expressions and binding operator

2000-12-20 Thread Peter Scott
At 11:39 PM 12/20/00 +, Nicholas Clark wrote: >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/

Re: Expressions and binding operator

2000-12-20 Thread Nicholas Clark
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 rig

Expressions and binding operator

2000-12-20 Thread Peter Scott
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 p