in reply to Value of $_ inside a regex
I don't know if this adds anything valuable to this thread, but I've played around quite a bit with code eval expressions. Here's a trick that allows you to do modification without using substitution:
perl -wMstrict -E 'for(1..3){/2(?{$_ += 10})/;say}' 1 12 3
|
|---|