Do you want to remove coin from the array?
my @not_coin = grep { $_ ne 'coin' } @array;
Or do you want to replace coin by undef?
my @not_coin = map { $_ eq 'coin' ? undef : $_ } @array;
In reply to Re: Deleting Elements from an Array without their Index Number?
by Corion
in thread Deleting Elements from an Array without their Index Number?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |