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

Re: Deleting an element from the middle of an array

by salvadors (Pilgrim)
on Jan 08, 2001 at 02:27 UTC ( [id://50397]=note: print w/replies, xml ) Need Help??


in reply to Deleting an element from the middle of an array

Or alternatively, use splice, which will be much quicker, and also not break arrays that happen to have more than one entry with the same value ...

splice @array, $ELEMENT_NUMBER_WE_WANT_DELETED, 1;

Tony

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50397]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 22:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found