perlbench

 view release on metacpan or  search on metacpan

benchmarks/app/perlfunc.pod  view on Meta::CPAN

4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
returns the last element removed, or C<undef> if no elements are
removed.  The array grows or shrinks as necessary.
If OFFSET is negative then it starts that far from the end of the array.
If LENGTH is omitted, removes everything from OFFSET onward.
If LENGTH is negative, removes the elements from OFFSET onward
except for -LENGTH elements at the end of the array.
If both OFFSET and LENGTH are omitted, removes everything. If OFFSET is
past the end of the array, perl issues a warning, and splices at the
end of the array.
 
The following equivalences hold (assuming C<< $[ == 0 and $#a >= $i >> )
 
    push(@a,$x,$y)      splice(@a,@a,0,$x,$y)
    pop(@a)             splice(@a,-1)
    shift(@a)           splice(@a,0,1)
    unshift(@a,$x,$y)   splice(@a,0,0,$x,$y)
    $a[$i] = $y         splice(@a,$i,1,$y)
 
Example, assuming array lengths are passed before arrays:
 
    sub aeq {   # compare two list values



( run in 0.435 second using v1.01-cache-2.11-cpan-49f99fa48dc )