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 get the new string ang $foo.=s/// to mutate $foo. For bare s///, I think copying is more useful than mutating. I'm not sure, and am posting this before actually thinking about it :) Juerd