in reply to remove value from array without index

Use a negated grep()

use strict; my @x = grep { ! /2/ } qw( 1 2 3 11 12 13 ); print "@x"; 1 3 11 13