http://www.perlmonks.org?node_id=798031
babel17 has asked for the wisdom of the Perl Monks concerning the following question:

Nevermind, total brain fart. was getting the sense of the Trinary wrong

I would have thought that the return value of a successful chomp would be interpreted as "true", but it appears that it returns false. Or maybe I'm just fignerent.

example.
I'm joining a list of newline separated strings from STDIN with '|' so that I can use them as input to a regex.

my $names=join("|",map {chomp $_ ?"":$_} <STDIN>);
but it don't work. To get it to function correctly I have to reverse the sense of the trinary operator.
my $names=join("|",map {chomp $_ ?$_:""} <STDIN>);
Anyone care to enlighten me?