develooper Front page | perl.beginners | Postings from April 2002

Re: wipe out elements in an array

Thread Previous | Thread Next
From:
Jeff 'japhy' Pinyan
Date:
April 25, 2002 17:24
Subject:
Re: wipe out elements in an array
Message ID:
Pine.GSO.4.21.0204252024210.18750-100000@crusoe.crusoe.net
On Apr 25, Bryan R Harris said:

>I'd like to remove all elements in an array that meet a certain criteria
>without changing their order.  I'm sure this gets done all the time, but
>I'm not sure how to do it...

You want splice() instead.

  perldoc -f splice

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About