John W. Krahn wrote:

You do realise that ++$#array modifies @array?

$ perl -le'
@array = 90 .. 99;
print scalar @array;
++$#array;
print scalar @array;
++$#array;
print scalar @array;
'
10
11
12


D'Oh! Yep, it does...


Once upon a time $#array + 1 was the size of the array; obviously (scalar @array) now has the right size.


I stand corrected then.


-Bill-
__Sx__________________________________________
http://youve-reached-the.endoftheinternet.org/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to