I should have said: file-scoped lexical.
On Sat, 30 Sep 2000 21:56:43 +0100, Nicholas Clark wrote:
>If it's lexically scoped, would it be for arrays declared in that scope, or
>for arrays accessed in that scope?
>I'm not sure. I think I see potential breakage both ways.
You don't declare Perl arrays. They just exist. Well... except for my'ed
arrays.
My idea is that if anybody sets $[ to 1 in a script, all accesses to
array in that script would use 1 as the index of the very first item:
$ary[1]. But if you pass this array (for example, a reference to it) to
a function in a module that doesn't set $[, it would access the same
first item through index 0: $ary[0] or $ref->[0].
And vice versa (swap "module" and "script").
--
Bart.
- Re: RFC 355 (v1) Leave $[ alone. Nicholas Clark
- Re: RFC 355 (v1) Leave $[ alone. Nicholas Clark
- Variable attributes (was Re: RFC 355 (v1) Leave $[ al... Bart Lateur
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $... John Porter
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Lea... Peter Scott
- Re: Variable attributes (was Re: RFC 355 (v1)... Nathan Wiger
- Re: Variable attributes (was Re: RFC 355 (v1) Lea... John Porter
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $... John Porter
- Re: Variable attributes (was Re: RFC 355 (v1) Leave $... David L. Nicol
- Re: RFC 355 (v1) Leave $[ alone. Glenn Linderman
