Use a negated grep()
use strict; my @x = grep { ! /2/ } qw( 1 2 3 11 12 13 ); print "@x"; 1 3 11 13
In reply to Re: remove value from array without index
by fglock
in thread remove value from array without index
by rsiedl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |