This is weird. I tried that as well, but it doesn't work for me:
Q:\>perl -le "@l=qw(a b c);$b=3;do{local @::{@l};$b=2;print $b};print +$b 2 2 Q:\>perl -v This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 50 registered patches, see perl -V for more detail) Copyright 1987-2006, Larry Wall Binary build 820 [274739] provided by ActiveState http://www.ActiveSta +te.com Built Jan 23 2007 15:57:46 Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
On 5.10.0, it starts working:
G:\Aktivitaeten\IDV\wp2-XML-sst\OUTPUT>perl -le "@l=qw(a b c);$b=3;do{ +local @::{@l};$b=2;print $b};print $b" 2 3 G:\Aktivitaeten\IDV\wp2-XML-sst\OUTPUT>perl -v This is perl, v5.10.0 built for MSWin32-x86-multi-thread Copyright 1987-2007, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.
So, I should test my ideas not with the stock Perl but with my "most recent" Perl available :)
In reply to Re^2: Local $$_?
by Corion
in thread Local $$_?
by expresspotato
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |