The regex engine does not allow (?{code}) blocks to alter pos(). I wanted to do that once and dug into the source. Just prior to executing the code it saves a copy of pos() and restores it immediately afterward. tye answered the other concern but didn't address this issue.
Fun Fun Fun in the Fluffy Chair
In reply to Re^2: Applying regexes to streams: Perl enhancement idea
by diotalevi
in thread Applying regexes to streams: Perl enhancement idea
by tye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |