in reply to Re: s/// only replacing most of the time...
in thread s/// only replacing most of the time...
$str = q{TTTTTTT}; $str = s/TTT/ttt/i;
That should be =~.
So, my question becomes, is there a way to set s/// to start looking for replacements at $-[0] + 1 when in a global context, rather than at $+[0]
In Perl 6 it will be very easy, a matter of specifying the :ov (:overlap) modifier. In 5's realm you can play with the pos function. There's been a very recent discussion about these topics.
|
|---|