my $ns = ''; my @a = qw(one two 3 $ns five); s/(\$.*)/$1/ee foreach @a; #### my @a = grep {s/^''$//;1} qw(one two 3 '' four five);