in reply to How to slurp files and join lines
How about this: Perl Idioms Explained - my $string = do { local $/; <FILEHANDLE> }; ?
UPDATE:
Oh ... you want to remove the newlines ... well, you could remove the newlines with a simple regex:
or replace them with a single space:$string =~ s/\n//g;
Although i am very curious as to why you would want to do that ... what are you going to do with the string afterwards?$string =~ s/\n/ /g;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|