On Sun, Feb 13, 2011 at 3:50 PM, Christian Walde <mithaldu@yahoo.de> wrote:
> Even discussing indirect versus direct seems worth it in such
> documentation, since indirect notation can lead to code being executed that
> was never intentended to be executed. The same can't really happen when
> using EXPR map syntax, right?
>
Define "really":
sub f(_) { }
for (sub { print "Just another " }, sub { print "Perl hacker," }) {
my @y = map f $_->(), sub { die "Gotcha!" }
}
Compare:
sub f(_) { }
for (sub { print "Just another " }, sub { print "Perl hacker," }) {
my @y = map f, $_->(), sub { die "Gotcha!" }
}
Eirik
Thread Previous
|
Thread Next