Skip to content

Commit

Permalink
[perl #121681] fix documentation of delete at the end of an array
Browse files Browse the repository at this point in the history
  • Loading branch information
Anno Siegel authored and tonycoz committed Apr 21, 2014
1 parent 48cbd9d commit deaf6ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pod/perlfunc.pod
Expand Up @@ -1368,9 +1368,10 @@ in their corresponding positions.
delete() may also be used on arrays and array slices, but its behavior is less
straightforward. Although exists() will return false for deleted entries,
deleting array elements never changes indices of existing values; use shift()
or splice() for that. However, if all deleted elements fall at the end of an
or splice() for that. However, if any deleted elements fall at the end of an
array, the array's size shrinks to the position of the highest element that
still tests true for exists(), or to 0 if none do.
still tests true for exists(), or to 0 if none do. In other words, an
array won't have trailing nonexistent elements after a delete.

B<WARNING:> Calling delete on array values is deprecated and likely to
be removed in a future version of Perl.
Expand Down

0 comments on commit deaf6ad

Please sign in to comment.