At the same time you were writting that, I was writting my own /g! Mine doesn't have an infinite loop like yours does, however. Try yours with:
$_ = 'foo bah bar'; $find = 'bah'; $replace = '[bah]'; first time in loop: foo [bah] bar second time in loop: foo [[bah]] bar third time in loop: foo [[[bah]]] bar ...
In reply to Re^3: Does s/\Q$find\E/$replace/g really a plain string replace ?
by ikegami
in thread Does s/\Q$find\E/$replace/g really a plain string replace ?
by MSoegtrop
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |