Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Deleting certein elements from an array

by hdb (Monsignor)
on Feb 07, 2019 at 13:03 UTC ( #1229544=note: print w/replies, xml ) Need Help??


in reply to Re: Deleting certein elements from an array
in thread Deleting certein elements from an array

Good explanation! However, the original question was to keep the negative elements of the array and thus it should be

@rand = grep { $_ < 0 } @rand;

Replies are listed 'Best First'.
Re^3: Deleting certein elements from an array
by haj (Priest) on Feb 07, 2019 at 13:45 UTC
    Drats... I fixed it in my test file but forgot to paste back. Thanks! I'll fix it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-05-19 01:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (71 votes). Check out past polls.

    Notices?