punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
My Perl script is outputting a text string to an MS Office app running on the user's PC, almost always under Windows. The document opens just fine, but I cannot get line breaks where I want them.
I've tried:
If I pass $part_1 and $part_2 to Ms Office through an html form and use VBA within the file to assemble the lines using$part_1 = "foo"; $part_2 = "bar" print $part_1."\n".$part_2; print $part_1."\r".$part_2; print $part_1."\n\n".p$art_2; print $part_1."\r\n".$part_2; print $part_1."\r\r".$part_2;
it works just fine, I get the line break I want. So I tried in PErlText = part_1 + Chr$(CharCode:=13) + part_2
but still no luck.$cr = 13; print $part_1.chr($cr).$part_2;
What's the trick to insert a Windows line break into an output text stream?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Correct line-feed characters to output to get MS Office to break new line?
by punch_card_don (Curate) on Feb 18, 2006 at 15:53 UTC | |
|
Re: Correct line-feed characters to output to get MS Office to break new line?
by Anonymous Monk on Feb 18, 2006 at 15:45 UTC |