TIMTOWTDI - chomp in a map and join seems fairly concise yet readable.
$ perl -Mstrict -Mwarnings -E ' open my $inFH, q{<}, \ <<EOD or die $!; Line 1 Line 2 Line 3 EOD my $wholeText = join q{ }, map { chomp; $_ } <$inFH>; say $wholeText;' Line 1 Line 2 Line 3 $
I hope this is of interest.
Cheers,
JohnGG
In reply to Re^2: Splitting a Sentence
by johngg
in thread Splitting a Sentence
by ardibehest
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |