Dr.Ruud schreef:
> Why gamble that "0" is a valid index, or even the minimal index, if
> there is "$["?
>
> Of course "the others" should use a local "$[" if they change it from
> the default 0 to some other value, but you just can't be sure that it
> will never bite you. Unless you use "$[" with "$#ary", because "$#ary"
> depends on "$[" like this: ($#ary -$[ +1) == scalar(@ary).
I totally overlooked that $[ is file-based (Perl 5), which means that
there are no "others".
perldoc perlvar [...]
As of release 5 of Perl, assignment to $[ is treated as a com-
piler directive, and cannot influence the behavior of any other
file. (That's why you can only assign compile-time constants
to it.) *Its use is highly discouraged.* [...]
--
Affijn, Ruud
"Gewoon is een tijger."
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>