alecclews has asked for the wisdom of the Perl Monks concerning the following question:
I have also tried various hacks based around setting $/ to no avail. Can anyone show me enlightenment? Thanks Alecsub multiChomp { my @out = $_; for (@out) { chomp; } return wantarray ? @out : $out[0] } @array = <> ; print join('',multiChomp(@array));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to slurp files and join lines
by duff (Parson) on May 26, 2005 at 16:07 UTC | |
by fishbot_v2 (Chaplain) on May 26, 2005 at 16:34 UTC | |
by Forsaken (Friar) on May 26, 2005 at 16:53 UTC | |
|
Re: How to slurp files and join lines
by cees (Curate) on May 26, 2005 at 16:29 UTC | |
|
Re: How to slurp files and join lines
by Joost (Canon) on May 26, 2005 at 16:05 UTC | |
|
Re: How to slurp files and join lines
by jeffa (Bishop) on May 26, 2005 at 16:07 UTC | |
|
Re: How to slurp files and join lines
by tlm (Prior) on May 26, 2005 at 18:03 UTC | |
|
Re: How to slurp files and join lines
by alecclews (Novice) on Aug 17, 2005 at 13:49 UTC | |
|
Re: How to slurp files and join lines
by TedPride (Priest) on May 26, 2005 at 19:39 UTC |