As projek21 pointed out, your problem is definetly with the sed command. Sed, from a perl perspective, always had strange semantics when it comes to patterns. Sed will not convert the two characters "\n" into the one character newline. Now there are ways around this limitation. One is to embed an actual newline like so:
(note that '>' character is not something you type in but whatever your shell's subshell prompt is.)shell prompt$ sed -e 's/<br>/\ > /g' < file.txt > file.out
But that's kinda wacky. You could also place your sed patterns in a file and use the -f option of sed:
file sedpat contains:
and the command is sed -f sedpat file.txt > file.out But I would dump the sed stuff all together and just put the replacment within your perl script (and using default $_):s/<br>/\ /g
-derbywhile (<REQUESTS>) { s/<br>/\n/g; s/\'/'/g; print MAIL; }
In reply to Re: getting text to line break in an email
by derby
in thread getting text to line break in an email
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |