The my() operator has a runtime effect of creating a new variable so each time you start that loop, you have a new variable to have potentially bound to. This also works if you write code like this.
my @abc; for my $m ( qw/a b c/ ) { push @abc, \ $m; } print @abc
In reply to Re^5: Lost anonymous subs
by diotalevi
in thread Lost anonymous subs
by kappa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |