my @strings = qw(boy bird FALSE); @strings = map { /FALSE/ ? qq{"$_"} : () } @strings; print join q{,}, @strings;