pop#
Remove the last element of a $DB_RECNO array and return it.
Synopsis#
my $last = $db->pop;
my $line = pop @lines;
What you get back#
The element’s value, or undef for an empty array. POP is the same method under the name the tied array calls.
Edge cases#
The array then ends at the last element that holds a value: empty elements before the removed one no longer count in its length, though the text file keeps them as empty lines.
It leaves the database’s cursor where the element was.
Differences from upstream#
Fully compatible with upstream. Covered by t/81-xs-native/DB_File/010-phenotype.t.
See also#
shift- the same at the start of the arraylength- how many elements are left