Re: Perl: removing an array element?
by "Harold A. Driscoll" <harold(at)driscoll.chi.il.us>
|
| Date: |
Mon, 31 Jan 2000 20:39:20 -0600 |
| To: |
"Peter Newton" <c-newton(at)ihug.co.nz> |
| Cc: |
<hwg-techniques(at)hwg.org> |
| In-Reply-To: |
co |
| |
todo: View
Thread,
Original
|
|
At 19:12 31-01-00 , Peter Newton wrote:
>Is their a SIMPLER way than this to remove a
>parlicular element from an array:-
Yes. Use the splice function... see perfunc (or the camel book) for details.
It allows you to remove one or several elements, or if you so desire
replace them with others. It returns the deleted elements.
A quite useful function. Safe computing, /Harold
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Harold A. Driscoll mailto:Harold(at)Driscoll.Chi.IL.US
#include <std/disclaimer> http://Driscoll.Chi.IL.US
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.