Thank!! great!!!, you open my mind, really i was knew that the solution is around that but i couldn't understand the documentation, perfect!!!!.
One last question, how works the modifier c and \G in a regexp
Could i do something like this:
my $x = "<0>";
for (qw {<1> <2> <3>}) {
if ($x =~ /<\d+>/gc) {
$x =~ s/\G(<\d+>)/$1$_/;
}
}
say $x;
Really thank JavaFan | [reply] [d/l] |
| [reply] [d/l] |
Don't angry with me!!!, yes you right i'm a little closed mind, and you and JavaFan help me open it, when you said use .* i said me couldn't be more stupid it's right!!!, i really fight before posting here for many hours and i cuoldn't find a solution, becouse of that i reasearch about not common at least for me functio, variable and operators like pos, $&, \G, etc, etc, but finally you right :-)
Thank to both
| [reply] |
I've no idea how to incorporate the /c modifier. It'll be pointless for two reasons. First, one sets pos() before matching, so who cares about the effect of /c. Second, /c would only kick in if you add a substring foo to $x, and the next time around, foo isn't there.
| [reply] |