in reply to Re: return value of chomp is false?
in thread return value of chomp is false?

That's what I tried first, but that returns (1,$_) for each value of $_

Replies are listed 'Best First'.
Re^3: return value of chomp is false?
by ikegami (Patriarch) on Sep 29, 2009 at 17:57 UTC

    Not it doesn't. I suspect you used a comma instead of a semi-colon.

    By the way, there's also

    use List::MoreUtils qw( apply ); my $names = join '|', apply { chomp } <STDIN>;
    and
    use Nested::Loops qw( Filter ); my $names = join '|', Filter { chomp } <STDIN>;