Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Remove elements from an array

by bibo (Pilgrim)
on Nov 23, 2004 at 17:59 UTC ( #409946=note: print w/replies, xml ) Need Help??


in reply to Remove elements from an array

Assign an empty string... $foo[1] = ();

how's that? --bibo UPDATE: no that's really wrong. ignore....

Replies are listed 'Best First'.
Re^2: Remove elements from an array
by ikegami (Patriarch) on Nov 23, 2004 at 18:04 UTC
    That doesn't remove any elements, it just undefines an element. (splice(@foo, $i, 1) removes element $i.) Also, you didn't address finding the elements that don't "contain a certain string".

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2022-05-25 17:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (90 votes). Check out past polls.

    Notices?