Re: s/// in string context should return the string

2003-11-22 Thread David Chan
[EMAIL PROTECTED] wrote: > Smylers wrote: >> This, however, is irritating: >> >> my @new = map { s:e/$pattern/$replacement/; $_ } @old; >> >> So I'd like a more elegant way of writing that -- but I don't think >> making the return value of C more complicated (and duplicating >> data in the proces

Re: s/// in string context should return the string

2003-11-22 Thread Luke Palmer
David Chan writes: > Hmmm. When doing multiple substitutions, it would be nice to avoid a > hard-to-read nested function call which reads backwards, a la python: > > return re.sub('>','>',re.sub('<','<',re.sub('&','&',text))) > > ... but to also avoid multiple statements like this: > > my $