On 29 May 2001, Jie Meng wrote:
> I am a newbie. Would you please tell me how to delete an element in an Array?
>
> We know we can use "delelte" to remove a hash element. How about array?
Same thing. See 'perldoc -f delete'. It can be used on an array, array
slice, hash or hash slice. Note that for an array, you will still need to
'shift' down all of the subsequent elements since delete does not
automatically shift down the indices. See the documentation on the
'splice' and 'shift' functions. You may also want to see what 'pop' can
do for you -- it pops off the end of the array (opposite of push), like
for stack.
-- Brett
Brett W. McCoy
Software Engineer
Broadsoft, Inc.
240-364-5225
[EMAIL PROTECTED]