why it doesn't delete middle elements ?
That is a really good question. My best guess is that it would be useful if an array was
tie'ed to a database.
Personally I do not find
delete used on an array to be particularly useful. My suggestion is that you use
splice instead, which has been around much longer.
Deleting elements from within an array is not really something that needs to be done very often, the (non-
tie) cases I can think of would all be better done using a hash.