Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Answer: How do I completely remove an element from an array?

( #495180=categorized answer: print w/ replies, xml ) Need Help??

Q&A > arrays > How do I completely remove an element from an array? contributed by jacques

I like using grep here.

@array = grep { $_ != $element_omitted } @array;

Comment on Answer: How do I completely remove an element from an array?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2013-05-24 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (516 votes), past polls