in reply to Functions in substitutions (s///) and Perl 5.8.
so yes, you can use pos() to reset the position.pos SCALAR pos Returns the offset of where the last "m//g" search left off for the variable in question ($_ is used when the variable is not specified). May be modi- fied to change that offset. Such modification will also influence the "\G" zero-width assertion in regular expressions. See perlre and perlop.
The error
looks like a perl bug to me, This routine converts a byte position to a unicode character position and translation should be transparent to the user.panic: sv_pos_b2u: bad byte offset at [...].
-Mark
|
|---|