Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Deleting certein elements from an array

by hdb (Monsignor)
on Feb 07, 2019 at 13:03 UTC ( [id://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 (Vicar) 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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-19 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found