http://qs321.pair.com?node_id=774038


in reply to why the array index has to start at 0??

It's works cleanly with so many constructs, like ...

with mod operator, for ring buffers:

$buffer[$i++ % $SIZE] = $foo;
with rand():

$pick = $array[rand(@array)];
I'm sure we could come up with many others. Natural, no?

ZeroFoo