Nathan Wiger wrote: [...] > RFC 164 v2 has a new syntax that lets you do the above or, if you want: > > $this = s/foo/bar/, $that; > @these = s/foo/bar/, @those; > > Consistent with split, join, splice, etc, etc. I often use the comma operator like this s/foo/bar/, $n++ if $x; If "s" is now a 2 parameter operator like split and join, how is it parenthesized? s(/foo/bar/, $_), $n++ if $x; in which case the parser/lexer may be looking for a subst of the form s()(), or (s/foo/bar/), $n++ if $x; which seems like "s" will be evaluated in list context, and therefore will use @_ instead of $_. My assumption here is that $x = s/foo/bar/; defaults to $x = s/foo/bar/, $_; and @x = s/foo/bar/; defaults to @x = s/foo/bar/, @_; although I may have missed something.
- Overlapping RFCs 135 138 164 Mark-Jason Dominus
- Re: Overlapping RFCs 135 138 164 Stephen P. Potter
- Re: Overlapping RFCs 135 138 164 Nathan Wiger
- Re: Overlapping RFCs 135 138 164 Steve Fink
- Re: Overlapping RFCs 135 138 164 Tom Christiansen
- Re: Overlapping RFCs 135 138 164 Tom Christiansen
- Re: Overlapping RFCs 135 138 164 Uri Guttman
- Re: Overlapping RFCs 135 138 164 Tom Christiansen
- copying and s/// (was Re: Ove... Uri Guttman
- Re: copying and s/// (was... Nathan Wiger
- Re: copying and s/// (was... Brad Hughes
- Re: copying and s/// (was... Mike Lambert
- Re: copying and s/// (was... Nathan Wiger
- Re: copying and s/// (was... Tom Christiansen
- Re: copying and s/// (was... Tom Christiansen
- Re: copying and s/// (was... Tom Christiansen
- Re: copying and s/// (was... Tom Christiansen
- Re: copying and s/// (was... David L. Nicol
- Re: Overlapping RFCs 135 138 164 Steve Fink
- Re: Overlapping RFCs 135 138 164 Tom Christiansen
- Re: Overlapping RFCs 135 138 164 Tom Christiansen