##
$ perl -Mstrict -Mwarnings -E '
my @x = qw{a b c};
say "@x";
@x = grep { $_ ne q{b} } @x;
say "@x";
'
a b c
a c
####
$ perl -Mstrict -Mwarnings -E '
my @x = ( qw{a}, (), qw{c} );
say "@x";
'
a c
####
$ perl -Mstrict -Mwarnings -E '
my @x = qw{a b c};
say "@x";
@x = map { $_ ne q{b} ? uc : () } @x;
say "@x";
'
a b c
A C