> Читал много книжек по перлу, хeр где нашел про > удаление элементов из массива... > Вроде ведь должны быть такие фундаменты написаны. > меня тут даже кое-кто обвинил в незнании азбуки > перла, а откудаж тут узнаешь если в книгах это > не пишут.
Не азбука, возможно, но классика (перевод, кажется. уже выходил):
Programming Perl Second Edition, September 1996.
By Larry Wall, Tom Christiansen & Randal L. Schwartz; ISBN 1-56592-149-6, 670 pages.
3.2.154 splice
splice ARRAY, OFFSET, LENGTH, LIST
splice ARRAY, OFFSET, LENGTH
splice ARRAY, OFFSET
This function removes the elements designated by OFFSET and LENGTH from an array, and replaces them with the elements of LIST, if any. The function returns the elements removed from the array. The array grows or shrinks as necessary. If LENGTH is omitted, the function removes everything from OFFSET onward.
|