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