Creating a reference to a constant must make a copy of it, because the following works without error too: (Perl v5.6.1)
foreach my $thing (qw/foo bar baz/) { print "$thing -> "; my $c = chop ${\$thing}; print " $thing,$c\n"; }
In reply to Re: foreach funny business
by ikegami
in thread foreach funny business
by krunchky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |