in reply to How to slurp files and join lines
Alternatively,chomp(@slurp = <>); print @slurp;
Update: I guess I should add perldoc -f chomp since you obviously didn't know that chomp already works on a list of values.$text = do { local $/; <>}; $text =~ s/\n//g; # for some \n print $text;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to slurp files and join lines
by fishbot_v2 (Chaplain) on May 26, 2005 at 16:34 UTC | |
by Forsaken (Friar) on May 26, 2005 at 16:53 UTC |