$ perl -E 'my @x = qw{a b c}; say "@x"; my $sel = "b"; my @y = grep { $_ ne $sel } @x; say "@y"' a b c a c