The stupid question is the question not asked | |
PerlMonks |
Re: Deleteing array elementsby si_lence (Deacon) |
on Jul 23, 2009 at 07:19 UTC ( [id://782586]=note: print w/replies, xml ) | Need Help?? |
If you know the index of the element you want to delete you can use a slice
otherwise I'm not sure if you can avoid an (implicit) loop. One possibility would be a grep Why do you want to avoid a loop? Are there so many elements in the array? Maybe you could avoid putting the unwanted elements in the array in the first place. cheers, si_lence
In Section
Seekers of Perl Wisdom
|
|