$foo.s/foo/bar/

2004-05-12 Thread Juerd
Juerd skribis 2004-05-12 20:15 (+0200): > But I think I still want to have some non-mutating version of s/// that > returns the modified string, so that you can just write something like > print s:gx/\w+/WORD/ for <>; Actually, can't we just use the . for s///? You'd then use $foo.s/// to ge

Re: $foo.s/foo/bar/

2004-05-13 Thread Rafael Garcia-Suarez
Aaron Sherman wrote: > Is it a special type of calling convention, e.g.: > > sub s (Regex $pat, Str $replace, bool ?$i) is doublequotelike returns(Str) { Ooh, "doublequotelike" sounds so much 1984. (Moreover it doesn't describe accurately the reality, which allows to use different delimiter

Re: $foo.s/foo/bar/

2004-05-13 Thread Aaron Sherman
On Thu, 2004-05-13 at 04:30, Rafael Garcia-Suarez wrote: > Aaron Sherman wrote: > > Is it a special type of calling convention, e.g.: > > > > sub s (Regex $pat, Str $replace, bool ?$i) is doublequotelike returns(Str) { > > Ooh, "doublequotelike" sounds so much 1984. > (Moreover it doesn't des

Re: $foo.s/foo/bar/

2004-05-12 Thread Aaron Sherman
On Wed, 2004-05-12 at 14:22, Juerd wrote: > Actually, can't we just use the . for s///? Well, that brings up something that I don't think Larry has covered yet. That is, it brings into question what s/// *is* in the grammar. Is it a special type of calling convention, e.g.: sub s (Rege

Re: $foo.s/foo/bar/

2004-05-12 Thread Luke Palmer
Aaron Sherman writes: > On Wed, 2004-05-12 at 14:22, Juerd wrote: > > > Actually, can't we just use the . for s///? > > Well, that brings up something that I don't think Larry has covered yet. > That is, it brings into question what s/// *is* in the grammar. Well, I imagine it's just a macro ca

Re: $foo.s/foo/bar/

2004-05-12 Thread Brent 'Dax' Royal-Gordon
Juerd wrote: Juerd skribis 2004-05-12 20:15 (+0200): But I think I still want to have some non-mutating version of s/// that returns the modified string, so that you can just write something like print s:gx/\w+/WORD/ for <>; Actually, can't we just use the . for s///? You'd then use $foo.s///