in reply to Re: local() peculiarities
in thread local() peculiarities
@jea=([1,"one"],[2,"two"],[3,"three"],); huu(\@jea); sub huu { my $i; for $i (0 .. $#{$_[0]}) { if ($_[0][$i]) { use vars (@bla); local *bla=$_[0][$i]; print "$i: @bla\n"; } print "@bla\n"; } }
As you can see, the later reference to "@bla" is still affected by "use vars" in above block; it doesn't give the warning/error it should. I thought the pragma should expire at the end of block (some doc implied that), but no...
-Kaatunut
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: local() peculiarities
by chipmunk (Parson) on Jan 22, 2001 at 23:03 UTC |