in reply to Concise foreach expression

Hello. I see this one is pretty much answered, but here is my two cents.

use strict; use warnings; my @names = ('ABC','123test','DEF','Gibberishafdaf','Moretest','Gibber +ishafdaf'); ($_ =~ /test$/) ? print "[$_] Pattern found\n": print "[$_] Pattern NO +T found\n" , for(@names);