develooper Front page | perl.perl6.language | Postings from May 2004


Thread Next
May 12, 2004 11:22
Message ID:
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

For bare s///, I think copying is more useful than mutating. I'm not
sure, and am posting this before actually thinking about it :)


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About