PERL:


PERL: - . 131


, ­ splice:

splice(@members, 2, 0, Like , initiates), print @members\n , splice(@members, 0, 1, Fruit ),


132 4

splice(members, -2, 2, , Banana print @members\n ,

:

Time Flies Like An Arrow Fruit Flies Like A Banana

> -------------------------------

splice push perlfunc(l); List Value Constructors perldata(l).

4.10.

( ).

reverse:

# ARRAY REVERSED REVERSED = reverse ARRAY,

for:

for ($l = $#ARRAY, $i >= 0 $l--) { # - $ARRAY[$i]

reverse; for . , for .

reverse ­ , . ­:

, ascending = sort { $a cmp $b } users, descending = reverse ascending,

# descending = sort { $b cmp $a } users,

> ---------------------------------------------------------------------------------------------

reverse perlfunc{\). 1.6.


4.11. ࠠ 133

4.11.

.

splice:

# $N ARRAY (shift $N)
CFRONT = splice(@ARRAY, 0, $N),

#  $N (pop $N)
END = spllce(@ARRAY, -$N),




- -  - -  - -