my @list = ("1","2","3",""); print join " and ", (@list); print "\n\n"; print join " and ", grep {$_?$_:undef} @list;