http://www.perlmonks.org?node_id=11124130


in reply to Re^2: A short whishlist of Perl5 improvements leaping to Perl7
in thread A short whishlist of Perl5 improvements leaping to Perl7

It took me ages to understand why and how to use the with keyword in python, until I realized it was an at attempt at recreating block-scoped variables.

I think I already had a similar discussion where LanX pointed out that python variables are lexically scoped as well, but the scope they are lexically bound to is the function, not the block. (perl decided to do block-scoped variables, but you could also imagine limitting the scope to a single expression. For example in push @out, {A => $one, b => $two} while my ($one, undef, $two) = some_function())