in reply to Re^2: I can't see why this shorthand doesn't behave like the verbose form
in thread I can't see why this shorthand doesn't behave like the verbose form
That does not change the scoping rules , { } introduces a new scope
$ perl -le " eval { my $foo = 1; } ; print $foo; " $ perl -le " use strict; eval { my $foo = 1; } ; print $foo; " Global symbol "$foo" requires explicit package name at -e line 1. Execution of -e aborted due to compilation errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: I can't see why this shorthand doesn't behave like the verbose form
by isync (Hermit) on Mar 25, 2012 at 17:02 UTC | |
by Anonymous Monk on Mar 25, 2012 at 17:13 UTC |