http://qs321.pair.com?node_id=1229544


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.