"my" is shorter than "local" or "let" and fairly evocative. Maybe you should ask why other languages don't use "my", instead. :P
"my" arrived after "local". The former is true lexical scoping, the latter isn't quite.
Right. As gp says, "local" is dynamic scoping.
It's available as long as the declaration stays on the call stack. It more-or-less allows globals to be temporarily redefined.
Re:Perl 6 Introduction
by DonHopkins on Saturday November 28, 2015 @02:10PM
(#10641998)
Think locally, act globally.
Yes, it's for historical reasons. "elsif" is spelled that way in Perl 5. Perl 5 has both "my" and "local" to specify lexical and dynamic scoping, respectively, so Perl 6 using "local" for lexical scope would be confusing. "slurp" is a common term for reading the entire contents of a file at once.