$ perl -e 'print join " ", grep { /y/ and /w/} ('red', 'cyan', 'yellow', 'blue' )' yellow