List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 4 2002 10:42pm
Subject:Re: Text formating in Perl
View as plain text  
At 18:56 +0200 8/4/02, eric wrote:
>Greetings!
>
>I have the same problem Blue Presley did only I'm using Perl.
>
>Using a textarea field with -wrap=>"virtual" I input
>
>Twas brillig, and the slithy toves
>Did gyre and gimbol in the wabe.
>All mimsy were the borogroves,
>And the mome raths outgrabe....
>
>and it shows up this way when I look at the table with mycc
>
>However when I try to print it out after SELECT  ....
>
>print p("$ref->[5]");
>
>it prints all as one line.
>
>How do I maintain text format extraction in Perl 5.6.1?  I can't seem to find
>the answer in either of the two books on Perl and MySQL.

Page 96 of one of those books describes the allowable options for -wrap,
one of which preserves line endings.

But even if you preserve line endings, just print the text using p()
as you do won't do any good.  Remember, line endings are ignored for
HTML display unless you print text within <pre> ... </pre> or convert
them explicitly to something like <br>.  You may want to handle the
text in a manner similar to PHP's nl2br() function.

Summary: it's not a MySQL issue, it's an HTML display issue.

>
>Thanks!
>Eric
>

Thread
Text formating in Perl(eric)4 Aug
  • Re: Text formating in PerlQuinten Steenhuis4 Aug
  • Re: Text formating in PerlPaul DuBois5 Aug
    • Re: Text formating in Perl(eric)5 Aug
  • Re: Text formating in PerlTod Harter6 Aug