use Scalar::Util 'refaddr'; for my $l ('a'..'b') { print 'loop variable ', refaddr \$l; $l =~ /(?{ print refaddr(\$l) }) /x; }
Here is the output:
loop variable 135603848 135606104 loop variable 135606092 135606104
In reply to Re: Iterating over code embeded in regex
by ioannis
in thread Iterating over code embeded in regex
by eibwen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |