in reply to How do I remove carriage returns from scalars?
I suspect that you want the Regular Expression Substitution command:
$foo =~ s/\n/ /g;
This will go through the whole of the string in $foo and globally ('cos of the trailing 'g') replace every \n with a space.
If your files are coming from a mac or a PC, you will need to change the pattern to match on
-- Ian Stuart
A man depriving some poor village, somewhere, of a first-class idiot.
|
|---|