On Fri, Nov 21, 2003 at 01:26:18PM +0000, Piers Cawley wrote:
: Simon Cozens <[EMAIL PROTECTED]> writes:
: 
: > [EMAIL PROTECTED] (Luke Palmer) writes:
: >>     $substituted = ($text ~~ s/$pattern/$replacement/) but nothing;
: >
: > Surely "no buts"? :)
: >
: >> What I really want is a functional version of s///.  Like:
: >>     my $substituted = $text.s(/$pattern/, { $replacement });
: >> Without modifying $text.
: >
: > $rubyometer++;
: 
: Only if it goes into the language Simon.

It would be nice to have a more systematic way of marking mutators--I
freely admit that it's inconsistent to have the default one way for
sort and the other way for s///.  I doubt that our solution to the
problem will be identical to Ruby's, but you'll notice the rubyometer
never seems to go back down when it should.  Someone should probably
check it for reference counter leaks...  :-)

Larry

Reply via email to