Good explanation! However, the original question was to keep the negative elements of the array and thus it should be
@rand = grep { $_ < 0 } @rand;
In reply to Re^2: Deleting certein elements from an array
by hdb
in thread Deleting certein elements from an array
by Eso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |