in reply to foreach funny business
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"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: foreach funny business
by shmem (Chancellor) on Jun 29, 2006 at 20:38 UTC | |
|
Re^2: foreach funny business
by Sidhekin (Priest) on Jun 29, 2006 at 20:39 UTC | |
|
Re^2: foreach funny business
by krunchky (Sexton) on Jun 29, 2006 at 22:01 UTC |