Not it doesn't. I suspect you used a comma instead of a semi-colon.
By the way, there's also
anduse List::MoreUtils qw( apply ); my $names = join '|', apply { chomp } <STDIN>;
use Nested::Loops qw( Filter ); my $names = join '|', Filter { chomp } <STDIN>;
In reply to Re^3: return value of chomp is false?
by ikegami
in thread return value of chomp is false?
by babel17
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |