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;
In reply to Re: How to slurp files and join lines
by duff
in thread How to slurp files and join lines
by alecclews
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |