in reply to Re: Variable scoping oddity inside (??{ ... })
in thread Variable scoping oddity inside (??{ ... })

Ah... closures! So that's what's happenning.

I did a research on Google and came up with a few interesting links on variable scoping inside closures. I will list them here for reference in case other monks might find them interesting.

1. Perl 6 mailing list message 5617;
2. Understanding closures - the easy way;

Thanks diotalevi and pg. And ++ for the explanation. Much appreciated.

  • Comment on Re: Re: Variable scoping oddity inside (??{ ... })

Replies are listed 'Best First'.
Re: Re: Re: Variable scoping oddity inside (??{ ... })
by ysth (Canon) on Nov 02, 2003 at 05:13 UTC
    bleadperl properly gives the 'Variable "$ok" will not stay shared' warning