Buddha Buck <[EMAIL PROTECTED]> writes:
>I haven't looked at the internals for local, but isn't:
>
>{
>   local $foo;
>
>   ...
>}
>
>effectively syntactic sugar for:
>
>{
>   my $unnamed_foo = $foo;     # $unnamed_foo not accessible
>
>   ...
>
>   $foo = $unnamed_foo;
>}
>
>Is there something in the behavior of local I'm missing?  

There certainly is - that functions _called_ in the scope of the 
local see the $unnamed_foo as the value of $foo too.
While hard to get ones brain round at first is is amazingly useful
on occasion.


-- 
Nick Ing-Simmons

Reply via email to