in reply to YAlQ: Yet Another local() Question.
In other words, local $_ is more like:
Most of the time, this has the same effect as assignment, but is faster. That's why Perl 5 uses it.{ my $saved = \$_; my $new; *_ = \$new; # ... *_ = $saved }
Unfortunately, this improvement in Perl 5 actually broke some code that expected localization to be visible via all names of aliased variables (e.g. exported variables). In short, you can't usefully localize an exported variable in Perl 5. This is a Bad Thing, and I hope that Larry fixes it somehow.
On the other hand, I hope that Larry finally fixes the name of the operator by renaming it to ``save''.
-- Chip Salzenberg, Free-Floating Agent of Chaos
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: YAlQ: Yet Another local() Question.
by BlaisePascal (Monk) on Aug 04, 2000 at 00:30 UTC | |
by chip (Curate) on Aug 04, 2000 at 06:38 UTC |