I thought about using substr as an lvalue, but I don't know of any way to insert new text without overwriting existing text.
The obvious way works ...
substr($code, $end, 0) = "}"; # -OR- substr($code, $end, 0, "}");
In reply to Re: parsing code, finding block boundaries
by duff
in thread parsing code, finding block boundaries
by revdiablo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |