[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Porters] Paragraph and line break, Unix to Mac



On Thu, Jul 22, 1999 at 09:11:18AM -0600, Linda Hardesty wrote:
> Dilettante question -
> I have a problem with some PERL code that I suspect has to do with the
> difference between Unix and Mac codes for End of paragraph, Break, 
> Less Than, and
> Greater Than.
> 
> Here is the problem section of code:
> 
> if ($quote_text == 1) {
>        @chunks_of_body = split(/\&lt\;p\&gt\;/,$hidden_body);
>        foreach $chunk_of_body (@chunks_of_body) {
>           @lines_of_body = split(/\&lt\;br\&gt\;/,$chunk_of_body);
>           foreach $line_of_body (@lines_of_body) {
>              print NEWFILE ": $line_of_body\n";
>           }
>           print NEWFILE "\n";
>        }
>     }
> 
> The split function never seems to find any &lt etc., or insert any 
> colons, except at the beginning of the text.
> What symbols I should use in place of
> \&lt\;p\&gt\; and \&lt\;br\&gt\; ?
> 

&lt;, &gt;, <P> and <BR> are neither UNIX nor Mac codes.  They are HTML
entitities and tags.


Are you trying to split text that looks like this

  This is a sentence.&lt;br&gt;This is another sentence.

or text that looks like this

  This is a sentence.<br>This is another sentence.

or text that looks like this

  This is a sentence.
  This is another sentence.

?



Ronald


==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org